[rules-users] Drools Flow - new variables

Michal Bali michalbali at gmail.com
Wed Nov 5 20:41:52 EST 2008


Hello,

Is there a way to define new variables within ruleflow?.

If I try to set variable that hasn't been declared in the ruleflow header -
the variables section. I get following error:
"Could not find variable someVariableName
Continuing without setting value"

I am using following code:
context.setVariable("someVariableName", "someValue");

I need this for couple of reasons:
 - I have a custom *generic* WorkItem that has some parameters. I want to
set them *dynamically* at runtime. Ideally, define new variables in onEntry
and then map them with an in-mapping.
 - in a subflow, the subflow calculates some value, I'd like to store this
value as variable and then use the out-mapping to propagate it to the parent
ruleflow.

I can't find any examples/test cases doing this.

Is there a way to define new variables within ruleflow?.

Thanking you in advance.
Best Regards,
Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081106/b0c5fb34/attachment.html 


More information about the rules-users mailing list