<!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></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>Thank you very much Kris.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I will define such a rule.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>thanks again.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Now I am experiencing something
different...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would like to introduce if\while statements into
the action node</FONT></DIV>
<DIV><FONT face=Arial size=2> "code part".</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is that possible?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Every time i introduce such a statement
into</FONT></DIV>
<DIV><FONT face=Arial size=2>the "textual editor "I get back a Mvel
exception.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In case It were not possible, I think I would
use</FONT></DIV>
<DIV><FONT face=Arial size=2>another rule like the one you suggested
me.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Grazie.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Massi</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=kris.verlaenen@cs.kuleuven.be href="">Kris Verlaenen</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org
href="">Rules Users List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, January 03, 2008 3:41
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [rules-users] Inserting
Facts within "Action nodes" (RuleFlow)</DIV>
<DIV><BR></DIV>
<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. Currently, it
only has access to global variables. It might indeed be a good idea to
also allow access to some kind of workingMemory variable. We
will try to add support for that when we add support for process
variables. If you want, you could open a JIRA for this to track the
issue.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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). 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> </DIV>
<DIV><FONT face=Arial size=2>rule "MyRule"</FONT></DIV>
<DIV><FONT face=Arial size=2> ruleflow-group "MyAction"</FONT></DIV>
<DIV><FONT face=Arial size=2> when</FONT></DIV>
<DIV><FONT face=Arial size=2> then</FONT></DIV>
<DIV><FONT face=Arial size=2> insert(new
Object());</FONT></DIV>
<DIV><FONT face=Arial size=2>end</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </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="">mmquelo massi</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=rules-users@lists.jboss.org href="">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> </DIV>
<DIV>Hi guys,</DIV>
<DIV> </DIV>
<DIV>Is it possible to insert a new fact in the ruleflow action nodes?</DIV>
<DIV> </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> </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> </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>
<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></DIV></BODY></HTML>