This content has been marked as final.
Show 1 reply
-
1. Re: intermediateCatchEvent - conditionalEventDefinition using drools
wtimpany Mar 26, 2012 1:23 PM (in response to wtimpany)I have managed to find a solution that works for me with a bit of googling, and inspecting the example applications.
With the Script Task and the updated Condition Definition, inserting my Facts triggers the Condition.
Script Task preceding the Condition
// -- set variable in kcontext kcontext.setVariable("instanceId", wsb.getInstanceId()); // -- insert ProcessInstance into KnowledgeRuntime kcontext.getKnowledgeRuntime().insert(kcontext.getProcessInstance());
Updated BPMN Task
<intermediateCatchEvent id="_5" name="Wait Until - Has Production Infrastructure is false" > <conditionalEventDefinition> <condition xsi:type="tFormalExpression" language="http://www.jboss.org/drools/rule">$processInstance : WorkflowProcessInstance() $instanceId : String() from (String)$processInstance.getVariable("instanceId"); InstanceInfrastructureFact(exists == "No", instanceId == $instanceId);</condition> </conditionalEventDefinition> </intermediateCatchEvent>