<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>The ruleflow action node can be used to specify 
some action (as a piece of code) that should be executed.&nbsp; Currently, it 
only has access to global variables.&nbsp; It might indeed be a good idea to 
also allow access to&nbsp;some kind of&nbsp;workingMemory variable.&nbsp; We 
will try to add support for that when we add support for process 
variables.&nbsp; If you want, you could open a JIRA for this to track the 
issue.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Your solution, defining wm as a global, seems a 
possible workaround (and I don't see any problems that might arise by doing 
this).&nbsp; Another one would be using a ruleset node instead of an actionNode, 
and specifying a rule that does not have any conditions, something 
like:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>rule "MyRule"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp; ruleflow-group "MyAction"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp; when</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp; then</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; insert(new 
Object());</FONT></DIV>
<DIV><FONT face=Arial size=2>end</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=mmquelo@gmail.com href="mailto:mmquelo@gmail.com">mmquelo massi</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org 
  href="mailto:rules-users@lists.jboss.org">Rules Users List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, January 02, 2008 7:55 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [rules-users] Inserting Facts 
  within "Action nodes" (RuleFlow)</DIV>
  <DIV><BR></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Hi guys,</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Is it possible to insert a new fact in the ruleflow action nodes?</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>I tried it simply adding an "insert(new Object())" instruction</DIV>
  <DIV>in the action-node "textual editor" but I got back the following</DIV>
  <DIV>exception:</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><U><FONT color=#000080 size=2>
  <P>org.mvel.PropertyAccessException</P></FONT></U><FONT color=#ff0000 size=2>: 
  unable to resolve property: insert(new Object())</FONT> 
  <P><FONT color=#ff0000 size=2><FONT color=#000000>Is it a simple dialect issue 
  ? How to do it correctly?</FONT></FONT></P>
  <P><FONT color=#000000 size=2>Thank You!</FONT></P>
  <P><FONT color=#000000 size=2></FONT>&nbsp;</P>
  <P><FONT color=#ff0000 size=2><FONT 
color=#000000>Massi</FONT></FONT></P></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>rules-users mailing 
  list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE></BODY></HTML>