Here are rules represented in Excel decision table.
There are three rules in the following decision table. For example, Rule1 (Row 11) means that if the 'userlocation' is set to ‘NewYorkUser’ and the initial count is less 4, then the ‘loopcondition’ is set to 6.
Following is the main process flow diagram. This example has a loop condition which is determined using the rules shown in the above decision table in the RuleTask 'LoopConditionRules'.
'LoopConditionRules' is a 'Rule Task' component and it needs to have a valid RuleFlowGroup name (e.g., EvalLoopcondistion as shown below) and it should match with the 'RULEFLOW-GROUP' name (Column C) of the decision table.
kmodule.xml file provides the name of the package and the ksession's name.
This example has a bpmn file (processRuleslooptest777.bpmn), model file (HelloProcessModel.java), rules file (LoopConditionRules.xls) and a test file (ProcessRuleTest.java).
After running ProcessRuleTest successfully, following results can be seen.