[rules-users] Setting a Flow Variable from a Rule

Kris Verlaenen Kris.Verlaenen at cs.kuleuven.be
Sun Jan 17 19:23:44 EST 2010


If you have access to the process instance that contains the variable,
you can do 
  ((RuleFlowProcessInstance) processInstance).setVariable(name, value);

Changing the value of an object that has been set as a variable in a
process instance should also be taken into account.  Do you have an
example of where this seems to have been broken in the snapshot?

Kris

Quoting Todd Pagni <todd.pagni at datacert.com>:

> How do you set a flow variable (not global) from inside a rule so it
> is
> available for nodes that follow the rule execution? I cannot seem to
> find this in the doc.
> 
>  
> 
> Previously I had a Person() fact that was also passed into the flow
> as a
> variable, when I modified the fact Person() object it was reflected
> in
> the flow variable, but the latest snapshot seems to have broken this
> so
> I am looking for alternatives.
> 
>  
> 
> 
> Thanks,
> 
> Todd
> 
> 




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the rules-users mailing list