[jboss-user] [jBPM] - Re: A question on the external event using event Correlation

Jim Hill do-not-reply at jboss.com
Mon Mar 14 12:29:59 EDT 2011

Jim Hill [http://community.jboss.org/people/jdh] created the discussion

"Re: A question on the external event using event Correlation"

To view the discussion, visit: http://community.jboss.org/message/593075#593075

I am implementing a similar solution and agree with Mauricio that you need to implement a business layer.  I am not as familiar with Drools and took a different approach which I will describe briefly.  I implemented the Selective Consumer pattern as described in Hohpe and Woolf's Enterprise Integration Patterns book.  In my case processes were started before the business key was assigned, so my messages do not always pass around the same business key.  This makes it harder to link them back to a running instance of a process.  I ended up writing a manager component in mule that receives JMS messages that may need to go to JBPM processes.  This component manages the start and end of process instances.  When it receives a messages it extracts the business key from the message and looks to a self contained map to determine if this key is related to an active process. If we find a match I pass the message to the active state in the process.  These are defined as custom nodes in the process.  The class implements ExternalActivityBehavior.  It is responsible for making sure it received the right message.  The value it returns is used by a decision node to determine if we need to keep waiting or can move on to the next wait state.

This is just one approach.  I welcome feedback from those who have been at this longer than I have.  It is working for me, but I am struggling with group timers which I am trying to implement in order to kill the process if the right message does not show up in a specified period of time.  Hope this adds an option for you to pursue.


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110314/1fe5a83e/attachment.html 

More information about the jboss-user mailing list