JBoss Community

Re: can i use rule task in embedded sub-process?

created by hardawaycg in jBPM - View the full discussion

sorry,after kinds of test,i found this is not because of embedded sub-process,but signal event.

 

rule task doesn't work on a flow file if these is signal event,this is my test case:

 

scene1: just like below,it works:

https://community.jboss.org/servlet/JiveServlet/downloadImage/2-646596-17769/450-149/%E6%9C%AA%E5%91%BD%E5%90%8D.jpg

with java code like this,the console print run,it works.

ProcessInstance process = ksession.startProcess("test2Flow");

                              ksession.fireAllRules();

                              ksession.signalEvent("event1", null,process.getId());

scene2:

1、replace the script task with a rule task,and set ruleflowgroup as sub1

https://community.jboss.org/servlet/JiveServlet/downloadImage/2-646596-17770/450-125/22%E5%90%8D.jpg

2、create a drl file and write a rule name "rule1":

rule "rule1"

          ruleflow-group "sub1"

    when

       

    then

        System.out.println("sub1");

end

3、add the drl resource on java code ,then run code like before.

the result is console print nothing ? why ?

Reply to this message by going to Community

Start a new discussion in jBPM at Community