rule

"A Rule"

        when

             not LoanBean();

        then

           LoanBean loan =

new LoanBean();

           loan.setLoanId(

"1");

           System.out.println(

"A rule");

           loan.setLoanId(

"1");

           assert(loan);

end

 

rule "B Rule"

    salience 10

    when

          a:LoanBean(loanId ==

"1");

       then

     System.out.println(

"B Rule");

end

 

I have given sailence 10 for "B Rule". So it has to fire first, then only "A Rule" should fire. And also If B Rule is firing first, obviously it won't fire, since it won't match loanId == "1", which is set by A rule. But for me it's displaying as "A Rule" and then "B Rule".. how is it possible? Why salience has no effect on rule B?


 

Get email for your site ---> http://www.everyone.net