<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Michal Bali wrote:
<blockquote
 cite="mid:58f4ed90811051741v593b3c10ld66b3ef338424a64@mail.gmail.com"
 type="cite">Hello,<br>
  <br>
Is there a way to define new variables within ruleflow?. <br>
  <br>
If I try to set variable that hasn't been declared in the ruleflow
header - the variables section. I get following error:<br>
"Could not find variable someVariableName<br>
Continuing without setting value"<br>
</blockquote>
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.<br>
<blockquote
 cite="mid:58f4ed90811051741v593b3c10ld66b3ef338424a64@mail.gmail.com"
 type="cite"><br>
I am using following code:<br>
context.setVariable("someVariableName", "someValue");<br>
  <br>
I need this for couple of reasons:<br>
&nbsp;- 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.<br>
&nbsp;- 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.<br>
  <br>
I can't find any examples/test cases doing this.<br>
  <br>
Is there a way to define new variables within ruleflow?. <br>
  <br>
Thanking you in advance.<br>
Best Regards,<br>
Michal<br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>