I have asked a somewhat similar question, but it wasn't formulated properly. I will try to explain it once more.
Below is my use case in a very abstract way.
(i). If there is at least one objA of type A, create another obj2A of type A.
(ii) If there are two or more object of type A, create an object objB of type B.
I have two rules in my .drl file, to check the 'if' condition in working memory for the two use case. Let's say the rules are named as rule1 and rule2. In these rules I am using Drools query. I am creating the objects ( both of type A and type B) in java side and firing the rules. So basically, in the 'then' part of the rules I am not doing any object creation so that the rules may start firing again.
At first I create an objA of type A and put it in the working memory.
Now I am firing the rules.
fire1) There will be match for rule1 only, and I will create another object of type A and put in the working memory. Firing again.
fire2) Now the situation arrives where both of the rule1 and rule2 matches.
Here are my two question.
At both fire1 and fire2, rule1 matches for object of type A. Is there a way to get the information from Drools that those pattern matches are similar or different ?
Is there a way to tell Drools not to evaluate rule1 when firing for the second time (fire2) ?
Kindly let me know if I should provide some more details.