[jboss-user] [jBPM] - Re: Design pattern for routing to multiple jBPM processes?

Jim B do-not-reply at jboss.com
Mon Apr 1 17:40:48 EDT 2013


Jim B [https://community.jboss.org/people/jamesbeam] created the discussion

"Re: Design pattern for routing to multiple jBPM processes?"

To view the discussion, visit: https://community.jboss.org/message/805869#805869

--------------------------------------------------------------
Maciej, thank you for your response - being able to assign a business key sounds ideal.  

Unfortunately, I have just about completed option one (of course!)  I am using the processinstancelog to find active processes:

     List<ProcessInstanceLog> pil = JPAProcessInstanceDbLog.findActiveProcessInstances(myProcessName)

My test program uses a signal to insert the object to a "routing" process (a start/stop node with my RoutingWorkItemHandler in the middle).  This process uses a signal start node, so it instantiates at each signal. 

To your point, it seems pretty kludgy to use transactions yet rely on the log to get the process ids.  However, thus far things seem to be working - I have inserted several signals at once and they have been properly handled.  Specifically, when I insert two of the same signals back to back, the RoutingWorkItemHandler sees the process from the previous signal and thus does not create a new one.  I made the executeWorkItem method in my RoutingWorkItemHandler synchronized, but it doesn't seem necessary.

So, my question is, does this seem logical to you, or does it just seem like dumb luck?

Thanks again,
-J
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/805869#805869]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

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


More information about the jboss-user mailing list