<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><div>Instead of creating 3 Knowledge bases you can have one KnowledgeBase with all three decision tables and then each decision table will have a "Salience" to control the priority of execution. DT1 has highest Salience and DT3 has lowest value.</div><div><br></div><div>When you upload these DT into Drools BRMS you will have one binary package for all these three DTs even though you define different packages for each one of those DTs. Is that the case ? </div><div><br></div><div><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> HonorGod
<jagadeesh.motamarri@barclayscapital.com><br><b><span style="font-weight: bold;">To:</span></b> rules-users@lists.jboss.org<br><b><span style="font-weight: bold;">Sent:</span></b> Fri, January 15, 2010 11:47:21 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [rules-users] Is this possible in Guvnor?<br></font><br>
<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'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><code><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></code><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><br><br><br><br><br><br><br><br><br><br>-- <br><span>View this message in context: <a target="_blank" href="http://n3.nabble.com/Is-this-possible-in-Guvnor-tp122132p122132.html">http://n3.nabble.com/Is-this-possible-in-Guvnor-tp122132p122132.html</a></span><br>Sent from the Drools - User mailing list archive at <a target="_blank" href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" 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></div></div><div style="position:fixed"></div>
<!-- cg17.c2.mail.re1.yahoo.com compressed/chunked Thu Jan 14 16:36:13 PST 2010 -->
</div><br>
</body></html>