[rules-users] Is this possible in Guvnor?

HonorGod jagadeesh.motamarri at barclayscapital.com
Fri Jan 15 11:47:21 EST 2010


Hi,

I have a single fact model with 5 [a1, a2,a3, a4, and a5] different
attributes. I have 3 decision tables in the following fashion

Decision Table 1

---------------------------------------------
condition | condition | condition |     Action    |
---------------------------------------------
    a1      |    a2       |      a3    |   a4 = a1+a3|
----------------------------------------------


Once I have the value of a4, I need to hit different set of rules which are
stored in second decision table 

Decision Table 2 

---------------------------------------------
condition | condition | condition |     Action    |
---------------------------------------------
    a1      |    a2       |      a4    |   a5 =  a4    |
----------------------------------------------


Once I have the value of a5, I need to hit different set of rules which are
store in third decision table

Decision Table 3

------------------------------------------------------------------------  
condition | condition | condition |   condition | condition |    Action         
|
-------------------------------------------------------------------------
    a1      |    a2       |      a3    |      a4       |     a5      |  
computeValue() |
------------------------------------------------------------------------


I don't have any problem when I load the rules into individual KnowledgeBase
and fire the rules one after the other as follows - 

<code>
        // apply rules from decision table 1 
        StatefulKnowledgeSession kSession =
knowledgeBase1.newStatefulKnowledgeSession() ;
        kSession.insert(caEventDO);
        kSession.fireAllRules();
        
        // apply rules from decision table 2
        kSession = knowledgeBase2.newStatefulKnowledgeSession() ;
        kSession.insert(caEventDO);
        kSession.fireAllRules();

        // apply rules from decision table 3
        kSession = knowledgeBase3.newStatefulKnowledgeSession() ;
        kSession.insert(caEventDO);
        kSession.fireAllRules();

        kSession.dispose() ;

</code>

But when I upload the decision tables into Guvnor and use the package / drl
from the package snapshot my second set of rules are not fired at all.

How do I resolve this issue?

Please help.

Thanks










-- 
View this message in context: http://n3.nabble.com/Is-this-possible-in-Guvnor-tp122132p122132.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list