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.  

>>>
Questions:
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
[http://community.jboss.org/message/625664#625664]

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

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to