[jboss-user] [jBPM] - Re: jBPM5 - Using as a state machine in clustered spring application with a dashboard

Gary tse do-not-reply at jboss.com
Fri Sep 9 01:56:33 EDT 2011

Gary tse [http://community.jboss.org/people/garytse] created the discussion

"Re: jBPM5 - Using as a state machine in clustered spring application with a dashboard"

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

Hi Narayan,

My team happens to be doing very similar stuff -- Orchestration of events using JBPM as a state machine.  The only difference is that we are using vanilla web service.  

a) What is the best way to configure the session, especially when processes instances are not shared?

For now, we use a single StatefulKnowledgeSession in a "primary" cluster-node to handle all of the processes eventhough we receive webservice calls from multiple web containers.   If scaling is needed, my plan is to move to multiple StatefulKnowledgeSessions located in different cluster nodes;  then have a mapping/ look up method to find where the actual proceses are.

2. Dashboard support 
Can't comment; we are not using this ... yet.

3. Event management - I would need to make use of  tasks(workItems)/events and another business layer to keep mapping between event meta-data to processInstance, workItem/eventId etc.. So when an business event occures I would be able to locate process instance then make following call to move it forward - ksession.getWorkItemManager().completeWorkItem(workItemId, parameters)

This is one part I find tricky too.  The events are unconditional.  Say, I have 10 instances of the same process type, each tries to receive a unique event to proceed.   Even though I can signal a EventType of 1-10 dynamically, I have no way to find out WHICH of the 10 instances is actually interested in my event.  For now, I just loop through all of the processes and notify each of them.   In the BPMN, I make a "loop" that conditions and loops back to waitfor the event again if the conditions do not match.

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/20110909/215eb9c3/attachment.html 

More information about the jboss-user mailing list