[jboss-user] [jBPM] - Re: Rule Task after Human Task

Maciej Swiderski do-not-reply at jboss.com
Fri Jan 20 09:20:02 EST 2012

Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Rule Task after Human Task"

To view the discussion, visit: https://community.jboss.org/message/647845#647845

Vlad, rules must be activated before they can be executed. Activation happens when facts are inserted/updated/retracted into the session. Maybe your case is that nothing happens before the Rule#2 is entered?

You could give a try with a onExit script for you human task node that will make any modification to the session, for instance insert a fact.

        <tns:onExit-script scriptFormat="http://www.java.com/java">

That should activate agenda and when process enters rule task it should have rules ready (of course if the rules condition will be satisfied). I am not a big rules expert so ... 

As for the listener, take a look at: org.drools.event.AgendaEventListener an example usage of it can be found here (https://github.com/droolsjbpm/jbpm/blob/master/jbpm-gwt/jbpm-gwt-core/src/main/java/org/jbpm/integration/console/StatefulKnowledgeSessionUtil.java), to trigger rules execution (of ruleflow-group) as soon as they activated.


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/20120120/660ad910/attachment-0001.html 

More information about the jboss-user mailing list