Open Siktik opened 9 months ago
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:
name: "weather rule" description: "if it rains then take an umbrella" condition: "rain == true" actions:
name: "temperature rule" description: "if the temperature is below 20 then wear a jacket" condition: "temp < 20" actions:
java.lang.IllegalArgumentException: The rule condition must be specified at org.jeasy.rules.support.reader.AbstractRuleDefinitionReader.createRuleDefinition(AbstractRuleDefinitionReader.java:81) at org.jeasy.rules.support.reader.AbstractRuleDefinitionReader.read(AbstractRuleDefinitionReader.java:45) at org.jeasy.rules.mvel.MVELRuleFactory.createRules(MVELRuleFactory.java:100)
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!