|
[drools-user] ApplicationData/Globals usage in when condition in drools-3: msg#00117java.drools.user
I'm evaluating Drools-3 for my project. I have a small drools-2 based application where I used to put an object of Type "Item" into the working memory as an application data and then do the comparison with the asserted object of type "GroupedItem" using: <application-data identifier="newOrderItem">Item</application-data> <rule name="grouped item exists"> <parameter identifier="gi"> <java:class>GroupedItem</java:class> </parameter> <java:condition>gi.getItemId().equals(newOrderItem.getItemId())</java:condition> <java:consequence> some code...... </java:consequence> </rule> I want to do the same using drools-3 and .drl file. Can i use globals here to do the comparison, like below ? global Item newOrderItem rule "grouped item exists" when $newOrderItem : Item($itemId : itemId) $gi : GroupedItem(itemId == $itemId) then end Whatever parameter that we declare in "when" condition, could point to an asserted object as well as the Globals ? Shouldnt the static information be supplied as application-data/global ? -- View this message in context: http://www.nabble.com/ApplicationData-Globals-usage-in-when-condition-in-drools-3-tf2838989.html#a7926365 Sent from the drools - user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [drools-user] Subversion problems, Francesco Campagnola |
|---|---|
| Next by Date: | Re: [drools-user] ApplicationData/Globals usage in when condition in drools-3, Steven Williams |
| Previous by Thread: | [drools-user] Subversion problems, Francesco Campagnola |
| Next by Thread: | Re: [drools-user] ApplicationData/Globals usage in when condition in drools-3, Steven Williams |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |