[rules-users] How can I use retract in action or exception handler?

EugeneP eugene.pakudin at riskfocusinc.com
Tue Jun 29 19:19:57 EDT 2010


Thanks, it helps.
But there are some more questions.
1. What is an official name of rule language, if it is not MVEL? Why "MVEL
dialect" in split constraints allow using code like:
        $p: Person ( age > 21 )
2. Why it is not possible to use rules in actions in MVEL mode? I suppose it
would be useful.
3. How can I create new object in the constraint? For example, I have a
constraint:

$p : Person( age < 21 )

- in this branch I need to create the new object "PersonFault" and insert it
to the working memory, but the code :

$p : Person( age < 21 )
$fault = new PersonFault($p, "WRONG AGE");
kcontext.getKnowledgeRuntime().insert($fault);

- is not working. Nor in the constraint, nor in the action...


Regards,
    EugeneP

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-can-I-use-retract-in-action-or-exception-handler-tp866102p931953.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list