[jboss-user] [jBPM] - how to fire rules after human task!!!
Xiaojun Hou
do-not-reply at jboss.com
Mon Jun 6 06:51:34 EDT 2011
Xiaojun Hou [http://community.jboss.org/people/houxiaojun] created the discussion
"how to fire rules after human task!!!"
To view the discussion, visit: http://community.jboss.org/message/608722#608722
--------------------------------------------------------------
Here is my process:
http://community.jboss.org/servlet/JiveServlet/showImage/2-608722-16463/%E6%9C%AA%E5%91%BD%E5%90%8D3.jpg http://community.jboss.org/servlet/JiveServlet/downloadImage/2-608722-16463/450-264/%E6%9C%AA%E5%91%BD%E5%90%8D3.jpg
In the process above,SelectResult is a rule task,i do not know to fire the rules in it after the human tasks ealier.By the way,if the rules can only be fired by "ksession.fireAllRules()" when the current node is a rule task?In the process above i use a script task before the rule task to fire the rule like this:
http://community.jboss.org/servlet/JiveServlet/showImage/2-608722-16464/%E6%9C%AA%E5%91%BD%E5%90%8D2.jpg http://community.jboss.org/servlet/JiveServlet/downloadImage/2-608722-16464/450-137/%E6%9C%AA%E5%91%BD%E5%90%8D2.jpg
but i can not see the result designed in the rule file:
package com.sample;
import com.model.Approve;
import org.drools.runtime.process.WorkflowProcessInstance;
rule "Request Passed"
ruleflow-group "select_result"
when
$process: WorkflowProcessInstance()
Approve(result == "pass") from $process.getVariable("approve1")and
Approve(result == "pass") from $process.getVariable("approve2")
then
System.out.println("Your request has passed!");
end
rule "Request Failed"
ruleflow-group "select_result"
when
$process: WorkflowProcessInstance()
Approve(result == "fail") from $process.getVariable("approve1")or
Approve(result == "fail") from $process.getVariable("approve2")
then
System.out.println("Your request has failed!");
end
The variable request,approve1、approve2 has been defined。Can anybody knows the answer of the problem,hope you can help us who have the same problem!!!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608722#608722]
Start a new discussion in jBPM at Community
[http://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/20110606/2bf70abc/attachment-0001.html
More information about the jboss-user
mailing list