2 Replies Latest reply on Apr 29, 2013 2:21 PM by cold gin

    afterProcessCompleted() not firing when last workflow task is business rule

    cold gin Newbie

      Hello. I have a workflow that contains a business rule as the last task, and exists on the flow just prior to a terminal (stop) task (jBPM 5.4.0). When this business rule task is present on the workflow definition, the afterProcessCompleted() event never fires on the DefaultProcessEventListener that I am attaching to my knowledge session. If I remove the business rule task in designer and re-execute the workflow, the event does fire on the DefaultProcessEventListener.


      I do not have any special configuration anywhere else in my setup that relates to this business rule task, as I was given this workflow by a third party. The code for the business rule from designer is as follows:


      <bpmn2:businessRuleTask xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" id="_51E71516-F613-4F75-BC82-88975FD75864" drools:selectable="true" xmlns:drools="http://www.jboss.org/drools" drools:ruleFlowGroup="Retract" name="Retract_Object">





      The workflow basically goes like this:


      start => human task => script task => business rule task => stop    [afterProcessCompleted() does not fire]


      start => human task => script task => stop     [afterProcessCompleted() fires as expected]


      I am new to jBPM and drools, and I was wondering if anybody can explain this behavior, and how to get the afterProcessCompleted() event to fire? Thanks in advance for any insight.