1) You are calling ksession.fireAllRules() or ksession.fireUntilHalt() so that the rules fires
2) The WorkItem inserted before the rules fire
Hope it helps
I think there is a defect in drools 5.1.1 where the following is removed from the process XML. You can try using jBPM 5.0 or 5.1-snapshot, both have this issue resolved.
Thanks for your reply. The following shows my test case:
KnowledgeBase kbase = createKnowledgeBase("bpmn/sample.bpmn");
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
ProcessInstance processInstance = ksession.startProcess("Minimal");
The work item is created during the process execution so do I still need to insert the work item via ksession.insert(..) also where do I invoke ksession.fireAllRules(..) method?
You can do in the following sequence: