<br><div class="gmail_quote">On Wed, Nov 5, 2008 at 2:36 PM,  <span dir="ltr">&lt;<a href="mailto:shikha.x.aggarwal@jpmchase.com">shikha.x.aggarwal@jpmchase.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br><font size="2" face="sans-serif">Thanks for the quick response. However
I still have two questions - </font>
<br><font size="2" face="sans-serif">1. Are we saying that we insert all
user objects in the working memory alogn with the Event that arrives at
runtime in the memory? What is the volume of data that the rules engine
can handle in terms of these users in working memory? </font>
<br><font size="2" face="sans-serif"></font></blockquote><div>correct, you may want to look at Drools Fusion, just search Drools blog for CEP, Complex Event Processing</div><div>AFAIK it can handle as many object as big is your memory :) especially true with the &#39;entry-point&#39; support (a rule can see only events it needs to)</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font size="2" face="sans-serif">2. I am still confused if I donot use
a rules engine (I dont have any work flows nor any complex logic), how
can I have a dynamic way of doing this? Please remember that I can have
one subscribed alert which says alert me when balance in account &lt; 1000
other can say alert me when report A is available.</font>
</blockquote><div>..&nbsp;<span class="Apple-style-span" style="font-size: 16px; ">User has a list of subscribed rules - subscribedRules<span class="Apple-style-span" style="font-size: 13px; ">&nbsp;</span></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><font size="2" face="sans-serif">Writing custome code around them would
require adding this custom code every time a new subscription requirement
arrives..</font>
<br>
<br><font size="2" face="sans-serif">Would appreciate any inputs on the same.</font>
<br>
<br><font size="2" face="sans-serif">thanks</font>
<br><font size="2" face="sans-serif">Shikha</font>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<p></p><table width="100%">
<tbody><tr valign="top">
<td width="40%"><font size="1" face="sans-serif"><b>&quot;Michal Bali&quot;
&lt;<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>&gt;</b> </font>
<br><font size="1" face="sans-serif">Sent by: <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a></font>
<p><font size="1" face="sans-serif">11/04/2008 05:53 PM</font>
</p><table border="">
<tbody><tr valign="top">
<td bgcolor="white">
<div align="center"><font size="1" face="sans-serif">Please respond to<br>
Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;</font></div></td></tr></tbody></table>
<br>
</td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">To</font></div>
</td><td><font size="1" face="sans-serif">&quot;Rules Users List&quot; &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;</font>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">cc</font></div>
</td><td>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">Subject</font></div>
</td><td><font size="1" face="sans-serif">Re: [rules-users] DROOLS having RHS
dynamic(5.0)</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table><div><div></div><div class="Wj3C7c">
<br>
<br>
<br><font size="3">Hi,<br>
<br>
You could have a rule that will match on User as well as Data. This should
prevent regenerating drl files<br>
<br>
rule rule1<br>
 &nbsp;when<br>
 &nbsp; &nbsp;$user:User( subscribedRules contains &quot;rule1&quot; )<br>
 &nbsp; &nbsp;$data:Data(userId == $</font><a href="http://user.id/" target="_blank"><font size="3" color="blue"><u>user.id</u></font></a><font size="3">)<br>
 &nbsp; &nbsp;... other conditions using $data.amount ...<br>
 &nbsp;then<br>
 &nbsp; &nbsp;//<br>
end<br>
<br>
Data is needed when a user wants to subscribe to one rule with different
values.<br>
<br>
However if you don&#39;t foresee any complex logic. I don&#39;t think there is
a need for a rule engine.<br>
<br>
Just my 2c.<br>
<br>
Best Regards,<br>
Michal<br>
<br>
</font>
<br><font size="3">On Tue, Nov 4, 2008 at 10:08 PM, &lt;</font><a href="mailto:shikha.x.aggarwal@jpmchase.com" target="_blank"><font size="3" color="blue"><u>shikha.x.aggarwal@jpmchase.com</u></font></a><font size="3">&gt;
wrote:</font>
<br><font size="2" face="sans-serif"><br>
Hi,</font><font size="3"> <br>
</font><font size="2" face="sans-serif"><br>
I am looking to use drools where I can have users subscribed to specific
alerts. Hence for example - <br>
I can have a rule like -&gt;</font><font size="3"> </font><font size="2" face="sans-serif"><br>
Rule 1 -&gt; amount &lt; {amount}</font><font size="3"> <br>
</font><font size="2" face="sans-serif"><br>
Where {amount} is the value which the user defines at the time of subscribing,
hence the user wants to recieve an alert when the amount in his account
&lt; {amount} that he just subscribed to.</font><font size="3"> <br>
</font><font size="2" face="sans-serif"><br>
I was trying to use the DROOLS template feature and was even able to succesfully
execute this specific scenario. The use case I was executing is, when an
event of type Rule 1 occurs , I get all users who are subscribed to rule
1, and then create a drl file for all of those users with there custom
data substituted as part of {amount}. Now I fire the rules(note I have
multiple rules one for each user} which executes for this specific event
and gives the required results(The above example is just a sample example).
My area of concerns are -</font><font size="3"> <br>
</font><font size="2" face="sans-serif"><br>
1. Is Rule engine really the platform I am looking at? As I dont have any
complex logic , I just want to use some component which can evaluate my
Events that arrive with different subscription rules?</font><font size="3">
<br>
</font><font size="2" face="sans-serif"><br>
2. If I regenearte the drl file every time an event arrives (I need to
because every time a iff type of rule can fire and the list of subscribers
can be different as well), this would have a performace impact as the rules
are compiled and generated every time and not really cached?</font><font size="3">
<br>
</font><font size="2" face="sans-serif"><br>
Please let me know if the problem is not clear. Any help/inputs in this
regard would be highly appreciated.</font><font size="3"> <br>
</font><font size="2" face="sans-serif"><br>
Thanks</font><font size="3"> </font><font size="2" face="sans-serif"><br>
Shikha</font><font size="3"> </font>
<p>
</p><hr>
<p><font size="3">This communication is for informational purposes only.
It is not intended as an offer or solicitation for the purchase or sale
of any financial instrument or as an official confirmation of any transaction.
All market prices, data and other information are not warranted as to completeness
or accuracy and are subject to change without notice. Any comments or statements
made herein do not necessarily reflect those of JPMorgan Chase &amp; Co.,
its subsidiaries and affiliates. This transmission may contain information
that is privileged, confidential, legally privileged, and/or exempt from
disclosure under applicable law. If you are not the intended recipient,
you are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance thereon)
is STRICTLY PROHIBITED. Although this transmission and any attachments
are believed to be free of any virus or other defect that might affect
any computer system into which it is received and opened, it is the responsibility
of the recipient to ensure that it is virus free and no responsibility
is accepted by JPMorgan Chase &amp; Co., its subsidiaries and affiliates,
as applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately contact
the sender and destroy the material in its entirety, whether in electronic
or hard copy format. Thank you. Please refer to </font><a href="http://www.jpmorgan.com/pages/disclosures" target="_blank"><font size="3" color="blue"><u>http://www.jpmorgan.com/pages/disclosures</u></font></a><font size="3">
for disclosures relating to UK legal entities. </font>
</p><p><font size="3"><br>
_______________________________________________<br>
rules-users mailing list</font><font size="3" color="blue"><u><br>
</u></font><a href="mailto:rules-users@lists.jboss.org" target="_blank"><font size="3" color="blue"><u>rules-users@lists.jboss.org</u></font></a><font size="3" color="blue"><u><br>
</u></font><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><font size="3" color="blue"><u>https://lists.jboss.org/mailman/listinfo/rules-users</u></font></a><font size="3"><br>
</font>
<br><font size="2"><tt>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
</tt></font>
<br>
</p><p></p><hr size="1"><p></p>
<p>
This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase &amp; Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase &amp; Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.

Please refer to <a href="http://www.jpmorgan.com/pages/disclosures" target="_blank">http://www.jpmorgan.com/pages/disclosures</a> for disclosures relating to UK legal entities.
</p><p></p><p></p><p></p></div></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>