I have a problem with integrating business rules in my BPMN2 process model. So my process looks like this
The drl file contains only one rule:
import com.sample.ProcessTest.User;
rule "AgeCheck"
ruleflow-group "AgeRules"
when
u:User (u.getAge()<17)
then
u.setName("Denied");
end
My problem is that I have two parameter Age, Name, and if I am not using rules I can pass them on gateways, script processes, but when I am using a business rule task it stops at this node.
I am starting the process from eclipse,
ksession.startProcess("_New.Process2", params);
System.out.println("Process started ...");
ksession.fireAllRules();
I added the resources,
kbuilder.add(ResourceFactory.newClassPathResource("Process2.bpmn2"), ResourceType.BPMN2);
kbuilder.add(ResourceFactory.newClassPathResource("AgeRules.drl"), ResourceType.DRL);
In the properties of RuleChecker node the rouleflow group is set to AgeRules and I have the following outcome when I am trying to run my project:
BEFORE PROCESS NODE TRIGGERED node:RuleChecker[id=5] process:Process2[id=_New.Process2]
BEFORE RULEFLOW GROUP ACTIVATED group:AgeRules[size=0]
AFTER RULEFLOW GROUP ACTIVATED group:AgeRules[size=0]
AFTER PROCESS NODE TRIGGERED node:RuleChecker[id=5] process:Process2[id=_New.Process2]
AFTER PROCESS NODE TRIGGERED node:InputUser [id=2] process:Process2[id=_New.Process2]
I don't know what is the problem exactly because the process stops at the rulechecker. If anybody can help me with this please explain me what is the problem
Kind regards, Hunor-Attila Kerekes