[rules-users] function in drools

thano asimoon at gmail.com
Fri Sep 28 12:03:58 EDT 2012


could you please help me how to do that in the following example. I will be
extremely thankful 

rule "MrFlow" 
     when 
          person : Person ( gender == 'M'); 
     then 
        
Number( doubleValue > $max ) from accumulate(
        SensorReading( $temp : temperature ) over window:time( 10m ),
        average( $temp ) )

                                                    // I want to use this
$temp variable in rule "HelloMr" . what                statement can i use
here to do that


          drools.setFocus("MrGroup"); 
end 
  

  
rule "HelloMr" 
     agenda-group "MrGroup" 
                                               // How can use the $temp
here.please give me an example

     when 
          person : Person (); 
     then 
          System.out.println("Hello Mr. " + person.getName()); 
          retract (person); 
end



--
View this message in context: http://drools.46999.n3.nabble.com/function-in-drools-tp4020021p4020044.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list