4 Replies Latest reply on Jan 3, 2012 5:37 AM by saig0

    missing trigger in event-based gateway

    saig0 Newbie



      I have a process with a event-based gateway and a ProcessEventListener to audit the running process instance. When the process instance arrives the gateway, all event nodes fire: NodeTriggered. After I send a signal to the process, one event node fires: NodeLeft and continue the process. That's ok but the other event nodes not fire: NodeLeft.

      Does anyone know why?

        • 1. Re: missing trigger in event-based gateway
          Esteban Aliverti Master

          Could you share with us your process? At least an image.

          I'm not sure about jBPM5 implementation of event-based gateways, but according to BPMN2:


          When the first Event in the Event Gateway configuration is triggered, then the path that follows that Event will used

          (a token will be sent down the Event’s outgoing Sequence Flows). All the remaining paths of the Event Gateway

          configuration will no longer be valid. Basically, the Event Gateway configuration is a race condition where the first

          Event that is triggered wins.


          So that may answer you question about why you only receive a single NodeLeft event.

          • 2. Re: missing trigger in event-based gateway
            saig0 Newbie

            An example process with an event gateway:


            I know that the event gateway is like an exclusiv gateway and will wait for just one event. My question is about the behavior of the ProcessEventListener in jBPM. I expected that all nodes will canceled after one event received and fire the trigger 'node left'.


            I use the ProcessEventListener for event correlation. When one event node is triggered, the listener register the process instance for this event on an external registry. After the node is left, the listener remove the registration. But if the listener will not trigger on event gateway, it will never remove the registration.

            • 3. Re: missing trigger in event-based gateway
              Esteban Aliverti Master

              Seems that that is not the behavior of ProcessEventListener. According to javadoc of afterNodeLeft():


                         * This listener method is invoked right after a node in a process instance has been left

                         * (which is when the node was completed, for example when it performed the task it was

                         * designed for).

                         * @param event



              And this is NodeInstanceImpl.cancel():

              public void cancel() {




              As you can see, no event is thrown when a node is canceled. I think it would be nice to have this type of event though. Could you plase file an issue in jBPM5 jira? https://issues.jboss.org/secure/CreateIssue!default.jspa

              • 4. Re: missing trigger in event-based gateway
                saig0 Newbie

                Thanks for decription! I created a feature request.