Hi,<br><br>Without understanding the intricacies, just on general sw engineering principles:<br>Is the number of possible package combinations too high to cache a rulebase instance for each combination, or at least the ones anybody used recently?<br>
<br>If you have n toggle buttons on the GUI to include different packages or not, then in the worst case you may end up with 2^n rulebase instances.<br><br>Or there could be a way to exclude packages from processing in individual workspaces.<br>
(other than adding a condition like UsePackageX() to each rule in a package...)<br><br><br>Gabor<br><br><div class="gmail_quote">2011/1/19 Nikhil S. Kulkarni <span dir="ltr"><<a href="mailto:Nikhil.Kulkarni@mastek.com">Nikhil.Kulkarni@mastek.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal">Hi All,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> I
am using JBOSS Rules 5.0.0, in which I am creating multiple RuleBase object
based on package passed to it.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">e.g. </p>
<p class="MsoNormal">public RuleBase (Package pkg)</p>
<p class="MsoNormal">{</p>
<p class="MsoNormal"> RuleBase
rb = RuleBaseFactory.newRuleBase();</p>
<p class="MsoNormal" style="text-indent: 0.5in;">rb.addPackage(pkg);</p>
<p class="MsoNormal" style="text-indent: 0.5in;">return rb;</p>
<p class="MsoNormal">}</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Though I know that creating RuleBase object every time will
have huge performance impact but it is required because when Multiple requests
will</p>
<p class="MsoNormal">Come on the application server based on functionality that
need to be triggered based on click of different buttons which internally call
Rules.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">So I am trying another option by declaring RuleBase as
Static Object so that it will be shared across application, but I am facing two
issues in that </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Suppose I am using single RuleBase object then all the
packages will be there that will be added using the above method on click of buttons
which internally</p>
<p class="MsoNormal">Call rules by multiple users.</p>
<p><span>1)<span style="font: 7pt "Times New Roman";">
</span></span>Now my problem is I cannot remove package after finish
of my task as user because if Suppose two users A and B are performing the same
task using different </p>
<p class="MsoNormal">Login. Now as User A, if he removes the package after its
processing of rules completed then User B will not find that package for doing
its task because if they both pass the above method at same time then both fill
find package present in RuleBase.</p>
<p><span>2)<span style="font: 7pt "Times New Roman";">
</span></span>If I keep all the packages as it is in RuleBase then
Rules Engine will be triggered for all Rules present in all packages satisfying
when condition.</p>
<p> </p>
<p>So I am not able to understand what I exactly should
do because currently I am facing performance issues in application and I think
the Reason</p>
<p>is multiple RuleBase objects.</p>
<p> </p>
<p>I have to change this So can anyone suggest me what I
should do ??</p>
<p> </p>
<p>Waiting for Reply. </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b>Thanks & Regards,</b></p>
<p class="MsoNormal"><b>Nikhil S. Kulkarni</b></p>
<p class="MsoNormal"><b> </b></p>
<p class="MsoNormal"> </p>
</div>
<br><br><table style="color: black;" bgcolor="white"><tbody><tr><td><br>MASTEK LTD.<br>
In the US, we're called MAJESCOMASTEK<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
</td></tr></tbody></table></div>
<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>
<br></blockquote></div><br>