[jboss-user] [jBPM] - Re: fireAllRules() in a loop issue
Maciej Swiderski
do-not-reply at jboss.com
Sat Feb 4 13:41:27 EST 2012
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion
"Re: fireAllRules() in a loop issue"
To view the discussion, visit: https://community.jboss.org/message/714450#714450
--------------------------------------------------------------
Rule must be activated (on agenda) to be eligible for invocation by fireAllRules, so multiple invocation of fireAllRules without modification to the session will not have any consequence. Activation happens on insert/update/retract operations on session. So, in your case you should insert or update a fact on session whenever human task is created (for instance with onEntry script) and fire activated rules. To trigger fireAllRules automatically you could use AgendaEventListener registered on the session, example you can find https://github.com/droolsjbpm/jbpm/blob/master/jbpm-gwt/jbpm-gwt-core/src/main/java/org/jbpm/integration/console/StatefulKnowledgeSessionUtil.java here
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/714450#714450]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120204/6205e81e/attachment.html
More information about the jboss-user
mailing list