rule "quest_reach_level_1_in_any_category_accomplished"
when
Event(id == "eventId")
not Event(id == "otherEventId")
exists Event(id == "param1" || "param2" ||
"param3" .... etc etc)
$gsc : GameStateController() // if you still need it,
consider adding it as a global
$response : Response() // if you can, set
it as global
then
... some business logic
end
Hello, guys,
I've got a rule which states:
rule "quest_reach_level_1_in_any_category_accomplished"
when
$gsc :
GameStateController(hasEventOccurred("eventId") &&
!hasEventOccurred("otherEventId") &&
hasAnyEventOccurred("param1", "param2", "param3", "param4",
"param5", "param6", "param7", "param8", "param9", "param10",
"param11", "param12"))
$response : Response()
then
... some business logic
end
which ends up with:
Caused by: org.drools.RuntimeDroolsException: Exception
executing predicate hasA
nyEventOccurred("level1_love", "level1_friendship",
"level1_prosperity", "level1
_charisma", "level1_willpower", "level1_wisdom",
"level1_entertainment", "level1
_adventure", "level1_inspiration", "level1_harmony",
"level1_lightheartedness",
"level1_confidence")
at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:298)
I'm using Drools 5.3.0.Final and it fails when it comes to
evaluating the predicate hasAnyEventOccurred(String... varArgs).
Thanks,
Martin
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users