[jboss-user] [jBPM] - Process variable and rule task

Cristiano Nicolai do-not-reply at jboss.com
Tue May 31 19:22:09 EDT 2011


Cristiano Nicolai [http://community.jboss.org/people/cristiano.nicolai] created the discussion

"Process variable and rule task"

To view the discussion, visit: http://community.jboss.org/message/608017#608017

--------------------------------------------------------------
Hi all,


    I'm writing a rule that analyze a variable in my process, and this variable is taken in consideration to fire a rule. So I did something very simple using the from conditional element in the left hand side.


rule "Test"
          ruleflow-group "test"
          when
                    $processInstance : WorkflowProcessInstance()
                    $str : String() from (String)$processInstance.getVariable("strValue");
          then 
                    System.out.println("str: " + $str);
end
 


     My doubt is that when I have this variable "strValue" started as a parameter when I start the process everything works fine but when I have it initialized using a Script Task node before my Rule Task node, the rule isn't fired. 

kcontext.setVariable("strValue", "test value");


     I can check that the value is set if I use it in the right hand side (without from) or getting the variable value from the java code who started the process.

    Any guess about this behavior? 


#


Thanks!
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/608017#608017]

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/20110531/440889f4/attachment-0001.html 


More information about the jboss-user mailing list