-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple rules in rule descriptor #416
Comments
Of course it can be supported, you can take a look at this implementation class. Finally, load them when your app started. |
aah, i was too quick there, found it when studying the yaml definitions. Thank you anyway sir this would have also helped, sure |
I try to fire this rules below, then failed, is there any issues in my Yml? rules:
java.lang.IllegalArgumentException: The rule condition must be specified |
Hey, yes in your condition your are missing to call the class you passed to the rule. "Rain" and "temp" are likely or even have to be properties of the class you are passing to the rule via facts.put(nameToUseInYml, yourClassInstance), so in the condition you need to call it like "nameToUseInYml.rain" and "nameToUseInYml.temp". Like this you can also call methods of that class where you can put in parameters. You can f.e. define a method for ur class that returns a bool and call this in your condition, f.e. if u need more complex programm logic. The same goes for the action. |
hey,
i want to give a customer the possibility to write a .yml file that i read from for the programm. I was wondering if it is possible to have multiple rules in a rule descriptor .yml. In the examples there is always only one rule, if there is a way to read more rules i would really want to know how this could be achieved. Thank you in advance!
The text was updated successfully, but these errors were encountered: