[rules-users] Help needed for a weird issue when firing an external event with Drools Expert and Flow

kitc25 chankia at ubs.com
Tue Jul 7 16:15:05 EDT 2009


I have the the following rule, 

rule "Validation" 
      ruleflow-group "Validation" 

      when 
             $tar : MyObject() 
              eval ($tar.validation() == true) 
      then 
             kcontext.getKnowledgeRuntime.signalEvent("ValidationError",
null); 
end 

Where ValidationError is an external event defined in Flow. 

The problem I am having is if I defined the ValidationError event to be
external, the signalEvent will get called all the time, and something $tar
will become null when I try to print it out before the signalEvent call, but
if I defined the ValidationEvent to be internal everything works as
expected, but I just can't trigger the event because it is internal.  Did I
do anything wrong?  Thank you for your help in advance. 

PS: I know I can trigger the internal event by passing the process object to
the session, then trigger the event with the process object, but I really
don't thnk this is a good design.
-- 
View this message in context: http://www.nabble.com/Help-needed-for-a-weird-issue-when-firing-an-external-event-with-Drools-Expert-and-Flow-tp24380543p24380543.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list