Esteban Aliverti [http://community.jboss.org/people/eaa] created the discussion
"Re: A question about rule task in jBPM5" To view the discussion, visit: http://community.jboss.org/message/637923#637923 -------------------------------------------------------------- Using fireUntilHalt() is not recomended nowadays becasue it causes a bunch of problems like race conditions, rollbacks in TX and even loose of controll of your execution (you don't know in which thread is your process instance running!). A better approach is to use an invocation pattern as the following one: Each time you want to interact with a process, you need to execute these steps: * get the session using JPAKnowledgeService (if you have different threads accessing the same session, it is recomended to queue all the access) * invoque the desidered action: startProcess(), signalEvent(), completeWorkItem(), etc. * invoque fireAllRules() this invocation is only useful if your process instances reached a Rule Node. If that is not the case, this invocation does nothing, so it is safe to execute it. * dispose your session. As far as I know, jBPM5 team and community are working in a more elegant solution that will encapsulate the call of fireAllRules() and make it transparent for the API user. Best Regards -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/637923#637923] 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