I have 3 rules in drool file.
rule1
rule2
rule3
if condition for rule1 is true then it should not execute rule2 or 3. If condition fails then it should go to next rule until the rule for which condition is true.
How to do this?
I think "activation-group" attribute may solve your problem. According to the drools documentation it is stated like the following
Rules that belong to the same activation-group, identified by this attribute’s string value, will only fire exclusively. More precisely, the first rule in an activation-group to fire will cancel all pending activations of all rules in the group, i.e., stop them from firing.
If you want your rules to be executed sequentially you can try to give them salience attribute as well.
if-elsestatements. - Esteban Aliverti