[jboss-user] [jBPM] - Re: When does Session.startProcess() return?

Brian Wallis do-not-reply at jboss.com
Mon Feb 7 18:19:32 EST 2011

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

Start a new discussion in jBPM at Community

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

More information about the jboss-user mailing list