[rules-users] DROOLS having RHS dynamic(5.0)

Michal Bali michalbali at gmail.com
Tue Nov 4 17:53:43 EST 2008


Hi,

You could have a rule that will match on User as well as Data. This should
prevent regenerating drl files

rule rule1
  when
    $user:User( subscribedRules contains "rule1" )
    $data:Data(userId == $user.id)
    ... other conditions using $data.amount ...
  then
    //
end

Data is needed when a user wants to subscribe to one rule with different
values.

However if you don't foresee any complex logic. I don't think there is a
need for a rule engine.

Just my 2c.

Best Regards,
Michal


On Tue, Nov 4, 2008 at 10:08 PM, <shikha.x.aggarwal at jpmchase.com> wrote:

>
> Hi,
>
> I am looking to use drools where I can have users subscribed to specific
> alerts. Hence for example -
> I can have a rule like ->
> Rule 1 -> amount < {amount}
>
> 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 < {amount} that he just subscribed to.
>
> 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 -
>
> 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?
>
> 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?
>
> Please let me know if the problem is not clear. Any help/inputs in this
> regard would be highly appreciated.
>
> Thanks
> Shikha
>
> ------------------------------
>
> 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 &
> 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 & 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
> http://www.jpmorgan.com/pages/disclosures for disclosures relating to UK
> legal entities.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081104/c8007ca8/attachment.html 


More information about the rules-users mailing list