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.
 
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:
 
rule "MyRule"
  ruleflow-group "MyAction"
  when
  then
    insert(new Object());
end
 
Kris
 
 
----- Original Message -----
From: mmquelo massi
To: Rules Users List
Sent: Wednesday, January 02, 2008 7:55 PM
Subject: [rules-users] Inserting Facts within "Action nodes" (RuleFlow)

 
Hi guys,
 
Is it possible to insert a new fact in the ruleflow action nodes?
 
I tried it simply adding an "insert(new Object())" instruction
in the action-node "textual editor" but I got back the following
exception:
 

org.mvel.PropertyAccessException

: unable to resolve property: insert(new Object())

Is it a simple dialect issue ? How to do it correctly?

Thank You!

 

Massi


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users