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

      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">

            <bpmn2:incoming>_ABC4091E-50C7-4B41-88D9-C4592DF259E3</bpmn2:incoming>

            <bpmn2:outgoing>_D86BD4F5-5151-4D67-863B-5AAE9D56E08E</bpmn2:outgoing>

      </bpmn2:businessRuleTask>

       

      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.