Open sss534534 opened 2 years ago
Just Same meaning as below:
``
org.jeasy.rules.api.Rule weatherRule = new RuleBuilder()
.name("weather rule")
.description("if it rains then take an umbrella")
.when(facts -> facts.get("rain").equals(true))
.then(facts -> {
System.out.println("It rains, take an umbrella!");
facts.put("umbrella", true);
})
``
how to update facts in yml:
`name: "weather rule" description: "if it rains then take an umbrella" condition: "rain == true" actions:
[Error: unresolvable property or identifier: facts] [Near : {... facts.put("umbrella", true); ....}] ^ [Line: 1, Column: 1]