Hi All,<div><br></div><div>I don&#39;t know whether I have encountered a strange problem or my understanding of drools is wrong.</div><div><br></div><div>I have 3 rules out of which two are dependent. Between the dependent ones &nbsp;one rule makes the other rule eligible to fire but I don&#39;t know why the dependent rule is not firing. Below are the rules I have written.</div>
<div><div>package com.valueMomentum;</div><div>import com.valuemomentum.eligibilitymodel.oo.*;</div><div>import java.util.ArrayList;</div><div>global java.util.ArrayList list;</div><div><br></div><div><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="color: rgb(255, 0, 0);">rule &quot;PolicyTierClassification&quot;</span></span></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span> no-loop true</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> when</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>healthInsuredbindings : HealthInsured( weight &gt;= 134 , weight &lt; 157 , height == &quot;4ft 10in&quot; , gender == &quot;Male&quot; )</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span> then</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>healthInsuredbindings.setPolicyTier(&quot;Standard I&quot;);</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>System.out.println(&quot;PolicyTierClassification&quot;);</div><div>list.add(&quot;To determine tier based on insured gender, height and weight(weight&gt;=134 , weight&lt;157 , height==4ft 10in , gender==Male ) -&gt; (PolicyTier = Standard I)&quot;); ;end</div>
<div><br></div><div><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="color: rgb(255, 0, 0);">rule &quot;AlcoholConsumptionClassRule&quot;</span></span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span> no-loop true</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span> when</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>healthInsuredbindings : HealthInsured( alcoholConsumptionFrequencyPerWeek == &quot;2-3&quot; )</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span> then</div><div>healthInsuredbindings.setAlcoholConsumptionClass(&quot;B&quot;);</div><div>&nbsp;System.out.println(&quot;AlcoholConsumptionClassRule&quot;);<br>
</div><div>list.add(&quot;To derive the alcohol consumption class based on consumption frequencyalcoholConsumptionFrequencyPerWeek==2-3 -&gt; (AlcoholConsumptionClass = B)&quot;); end</div><div><br></div><div><br></div><div>
<span class="Apple-style-span" style="color: rgb(255, 0, 0);"><span class="Apple-style-span" style="font-weight: bold;">rule &quot;UnderwritingFactorRule&quot;</span></span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span> no-loop true</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span> when</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>healthInsuredbindings : HealthInsured( alcoholConsumptionClass ==&quot;B&quot; )</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span> then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> healthInsuredbindings.setUnderwritingFactor(1);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> System.out.println(&quot;UnderwritingFactorRule&quot;);</div>
<div>&nbsp;&nbsp; &nbsp; list.add(&quot;To derive UnderwritingFactor from &nbsp;alcoholConsumptionClass==B -&gt; (UnderwritingFactor = 1)&quot;);end</div><div><br></div><div>this my initial fact&nbsp;HealthInsured healthInsured = new HealthInsured();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setAge(25);<br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setGender(&quot;Male&quot;);</div><div>
<span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setWeight(140);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setHeight(&quot;4ft 10in&quot;);</div><div>
<span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setTobaccoUser(&quot;No&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setMotorcycleRider(&quot;No&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setRelationToInsured(&quot;Insured&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setUnderwritingFactor(0);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setPolicyTier(&quot;Preferred&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setAlcoholConsumptionFrequencyPerWeek(&quot;2-3&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>healthInsured.setAlcoholConsumptionClass(&quot;A&quot;);</div><div>Based on the above fact <span class="Apple-style-span" style="color: rgb(255, 0, 0); font-weight: bold; ">PolicyTierClassification,&nbsp;AlcoholConsumptionClassRule </span>are eligible &nbsp;to fire.&nbsp;<span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="color: rgb(255, 0, 0);">AlcoholConsumptionClassRule</span></span> &nbsp;is setting a property alcoholConsumptionClass to B based on which<span class="Apple-style-span" style="font-weight: bold;">&nbsp;</span><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="color: rgb(255, 0, 0);">UnderwritingFactorRule </span></span>rule becomes eligible fire but in this case the dependent rule is not firing. I think we can use <span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="color: rgb(204, 0, 0);">update </span></span>in&nbsp;&nbsp;<span class="Apple-style-span" style="color: rgb(255, 0, 0); font-weight: bold; ">AlcoholConsumptionClassRule &nbsp;</span>but I think if we have to manage those dependencies it will be more error prone and the results are might be more inconsistent.&nbsp;</div>
<div><br></div><div>I have tested it Using RETEOO in drools 3.x and 4.x which yields me the same results. But when I used LEAPS algorithm then i even got the dependent rule i.e&nbsp;<span class="Apple-style-span" style="color: rgb(255, 0, 0); font-weight: bold; ">UnderwritingFactorRule </span><span class="Apple-style-span" style="color: rgb(255, 0, 0); ">&nbsp;</span>rule &nbsp;also fired<span class="Apple-style-span" style="font-weight: bold; ">.</span></div>
<div><span class="Apple-style-span" style="font-weight: bold;"><br></span></div><div><span class="Apple-style-span" style="font-weight: bold;">Thanks in Advance,</span></div><div><span class="Apple-style-span" style="font-weight: bold;"><br>
</span></div><div><span class="Apple-style-span" style="font-weight: bold;">sudhir.</span></div><div><br></div></div>