Why are you constructing multiple KBs and sessions? I mean those decision tables can be written in a way where you would only need a single KB and session if a4 and a5 in your examples can be set to some &quot;starting&quot; known state. <br>
<br>If a4 and a5 where initially set to null, or false, or -1 or NOT_SET you could rewrite the tables as follows<br><br>Decision Table 2 <br><br>------------------------------<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
---------------<br>
condition | condition | condition |     Action    |<br>
---------------------------------------------<br>
    a1      |    a2       |      a4 != NOT_SET    |   a5 =  a4    |<br>
----------------------------------------------</blockquote><br>Decision Table 3<br>
<br>
------------------------------<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">------------------------------------------<br>
condition | condition | condition |   condition | condition |    Action<br>
|<br>
-------------------------------------------------------------------------<br>
    a1      |    a2       |      a3    |      a4       |     a5 != NOT_SET     |<br>
computeValue() |<br>
------------------------------------------------------------------------<br>
</blockquote><br>Or use rule flow/agenda groups.<br><br>dave<br><br><br><div class="gmail_quote">On Fri, Jan 15, 2010 at 11:47 AM, HonorGod <span dir="ltr">&lt;<a href="mailto:jagadeesh.motamarri@barclayscapital.com">jagadeesh.motamarri@barclayscapital.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi,<br>
<br>
I have a single fact model with 5 [a1, a2,a3, a4, and a5] different<br>
attributes. I have 3 decision tables in the following fashion<br>
<br>
Decision Table 1<br>
<br>
---------------------------------------------<br>
condition | condition | condition |     Action    |<br>
---------------------------------------------<br>
    a1      |    a2       |      a3    |   a4 = a1+a3|<br>
----------------------------------------------<br>
<br>
<br>
Once I have the value of a4, I need to hit different set of rules which are<br>
stored in second decision table<br>
<br>
Decision Table 2<br>
<br>
---------------------------------------------<br>
condition | condition | condition |     Action    |<br>
---------------------------------------------<br>
    a1      |    a2       |      a4    |   a5 =  a4    |<br>
----------------------------------------------<br>
<br>
<br>
Once I have the value of a5, I need to hit different set of rules which are<br>
store in third decision table<br>
<br>
Decision Table 3<br>
<br>
------------------------------------------------------------------------<br>
condition | condition | condition |   condition | condition |    Action<br>
|<br>
-------------------------------------------------------------------------<br>
    a1      |    a2       |      a3    |      a4       |     a5      |<br>
computeValue() |<br>
------------------------------------------------------------------------<br>
<br>
<br>
I don&#39;t have any problem when I load the rules into individual KnowledgeBase<br>
and fire the rules one after the other as follows -<br>
<br>
&lt;code&gt;<br>
        // apply rules from decision table 1<br>
        StatefulKnowledgeSession kSession =<br>
knowledgeBase1.newStatefulKnowledgeSession() ;<br>
        kSession.insert(caEventDO);<br>
        kSession.fireAllRules();<br>
<br>
        // apply rules from decision table 2<br>
        kSession = knowledgeBase2.newStatefulKnowledgeSession() ;<br>
        kSession.insert(caEventDO);<br>
        kSession.fireAllRules();<br>
<br>
        // apply rules from decision table 3<br>
        kSession = knowledgeBase3.newStatefulKnowledgeSession() ;<br>
        kSession.insert(caEventDO);<br>
        kSession.fireAllRules();<br>
<br>
        kSession.dispose() ;<br>
<br>
&lt;/code&gt;<br>
<br>
But when I upload the decision tables into Guvnor and use the package / drl<br>
from the package snapshot my second set of rules are not fired at all.<br>
<br>
How do I resolve this issue?<br>
<br>
Please help.<br>
<br>
Thanks<br>
<font color="#888888"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://n3.nabble.com/Is-this-possible-in-Guvnor-tp122132p122132.html" target="_blank">http://n3.nabble.com/Is-this-possible-in-Guvnor-tp122132p122132.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>