Re[rules-users] ading incoming connection in Action - Rule flow

Kris Verlaenen kris.verlaenen at cs.kuleuven.be
Thu Jun 12 17:45:07 EDT 2008


> is action will support below kind of stuff ?
An action is like a rule consequence, it should be valid java or mvel code. 
Something like
    System.out.println("This is an action");
or
    insert(new Person());

The code you are using is actually a rule (you are matching variable p to an 
object in the working memory).  If you want to specify something like this, 
you can define it as a ruleflow-group node instead and add a rule for that 
ruleflow-group like this:

rule "MyRule" ruleflow-group "MyGroup"
when
  p: Person( )
then
  modify(p) {age = 20 }
end.

Kris




More information about the rules-users mailing list