[rules-users] Drools Flow - new variables
Mark Proctor
mproctor at codehaus.org
Wed Nov 5 21:18:15 EST 2008
Michal Bali wrote:
> 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 don't believe this is possible at the moment. We are in feature freeze
now for the core team, so we don't have time for new features, but if
you can dig into the code and figure out a clean way to do this with
some unit tests, we should be able to get it into 5.0.
>
> 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
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081106/c5f27432/attachment.html
More information about the rules-users
mailing list