[rules-users] how to use only updated value in drools

bharadwaj2012 bharadwaj2012 at gmail.com
Tue May 29 07:53:40 EDT 2012


rule "set b value"
      salience 10
    no-loop
    when
        e : Person(b == " ");
    then
    e.setB("10");
update(e);
end

rule "b other than 10"
      salience 1
     no-loop
     when
      e : Person(b != "10")
     then
       System.out.println("error"+e.getB());
end

see this code here first rule will get fire b=10 sencod rule will not match
since b=10
or if u want to get the updated value in secnond rule e : Person(b == "10")

--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-how-to-use-only-updated-value-in-drools-tp4017628p4017653.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list