0

We have a scenario to be implemented in Decision Table to exit from executing the remaining rules if certain rule successfully executes the action part of the rule. Suppose I have 50 rules and 5th rule is something which says insurance claim is invalid then we set claim as invalid to the object, then there is no need to execute remaining rules. How could this can be achieved. Please suggest

  • I have not found any reference to try. I fond in some blog where suggesting to use xor-group, but not sure what values I could enter in xor-group column. – Raghuram Reddy K Jun 08 '16 at 11:39

1 Answers1

0

You can

  • retract the fact under evaluation, after setting invalid to true, on that rule's RHS,
  • throw an exception (ugly, ugly),
  • run the session using fireUntilHalt and call method halt on the session on that rule's RHS - here you'll need a very low salience rule (added in a .drl file) to call halt in case the fact passes all decision table rules.
laune
  • 31,114
  • 3
  • 29
  • 42
  • I realize this thread is pretty old but how do you get a reference to the kieSession in the table itself so you can call halt()? – Michael Starkie Feb 27 '23 at 14:30
  • Sorry, that's too long ago but doesn't is say that you have to add a rule in a .drl file hat's nos part of the decision table? – laune Feb 28 '23 at 15:09