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

Mauricio Salatino do-not-reply at jboss.com
Mon Feb 7 07:10:20 EST 2011

Mauricio Salatino [http://community.jboss.org/people/salaboy21] created the discussion

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

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

About the Drools question, I don't think drools works on the way that you mention. 
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.
Drools works as follow:
You insert facts to the working memory. At that point all the rules related with that type of facts are analyzed and activations can be created (if the when part of one rule matches completly). Then when you call the fireAllRules() method, all the activations that were generated will be executed. That execution can cause more activations to be generated. At that point you can have a little bit of recursion caused by the inferences that are being done by the engine, but it shouldn't take too much time. It really depends on your use case, but Drools will not be waiting for matching all the rules blocking your application thread. It will run all the things that it can and after that it will return the control to your application.

Hope it helps!

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/6e32ee2b/attachment.html 

More information about the jboss-user mailing list