-
1. Re: missing trigger in event-based gateway
eaa Jan 2, 2012 3:47 AM (in response to saig0)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 Jan 3, 2012 2:57 AM (in response to eaa)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
eaa Jan 3, 2012 3:53 AM (in response to saig0)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() {
nodeInstanceContainer.removeNodeInstance(this);
}
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 Jan 3, 2012 5:37 AM (in response to eaa)Thanks for decription! I created a feature request.