Brian Wallis [http://community.jboss.org/people/bwallis42] created the 
discussion

"Re: When does Session.startProcess() return?"

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

--------------------------------------------------------------
> Mauricio Salatino wrote:
> 
> Instead of creating a new thread for each start process you can create your 
> first activity to be asynchronous. You will get the same efect without 
> complicating the threading model of your application. 
Eventually I hope that the definition and maintenance of the workflows will be 
by system integrators and even end user system admins so I don't want to have 
the possibility that an inexperienced workflow developer/maintainer could 
compromise the system by not having the first activity asynchronous.

> Mauricio Salatino wrote:
> 
> I'm not sure why are you asking about stateless sessions if you are running 
> processes inside the session, you should be working with stateful sessions.
> 

I plan to have a stateless session for a set of rules that are evaluated over a 
set of facts (generated by an incoming event from an ESB). These workflow 
creation rules are quite simple in nature, really just a set of filters for the 
incoming event to decide what type of workflow is required. The actions in 
these rules will create a new stateful session from a separate knowledgebase 
that contains the workflow definitions and then launch the workflow within this 
new session. So the model is one workflow instance per stateful session rather 
than one session with many workflow instances. 

The reason for this is that there is generally very little if any commonality 
in the facts that each workflow works with and there could be hundreds of 
workflow instances. The number of facts in a shared session would thus be 100's 
of times larger than the number of facts that any individual workflow in that 
shared session would require for its operation. I think this also makes cleanup 
of old facts easier since when the workflow completes the session is discarded.

I hope that this is a reasonable approach. This was the subject of my first 
post to this forum some weeks ago.
--------------------------------------------------------------

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

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