Thank you very much Kris.

I will define such a rule.

thanks again.

Now I am experiencing something different...

I would like to introduce if\while statements into the action node
 "code part".

Is that possible?

Every time i introduce such a statement into
the "textual editor "I get back a Mvel exception.

In case It were not possible, I think I would use
another rule like the one you suggested me.

Grazie.

Massi

  ----- Original Message ----- 
  From: Kris Verlaenen 
  To: Rules Users List 
  Sent: Thursday, January 03, 2008 3:41 PM
  Subject: Re: [rules-users] Inserting Facts within "Action nodes" (RuleFlow)


  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
    [email protected]
    https://lists.jboss.org/mailman/listinfo/rules-users



------------------------------------------------------------------------------


  _______________________________________________
  rules-users mailing list
  [email protected]
  https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to