[rules-users] some pointers for solution

2009-11-07 Thread Wishing Carebear
Hello: There are n selection criteria from s1 .. sn for each item i1.. in. Each item can have a subset of criteria which applies to them. The end user, can choose a subset of criteria like c1 and c5 and only the item that has c1 and c5 valid should be returned. For example: if item i1 and i2 have

Re: [rules-users] Fwd: Build package 'default' Guvnor

2009-11-07 Thread satjo
You need to create a new 'default' package (i.e, not the 'defauktPackage' that comes with Guvnor) and upload your ruleflow. Eugenio Abello wrote: > > Dear, I made new tests, and also fails to 'defaultPackage'. This made: > > 1) Create the files users.properties, roles.properties in > \drools

Re: [rules-users] Help needed - Problems with forall operator

2009-11-07 Thread Tom.E.Murphy
ICO( parentId == $parentCreditReport_1_Id, validScoreIndicator == > false) >) > then > System.out.print("Fired on " + $parentCreditReport_1_Id ); > end > > > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.j

[rules-users] MVEL and Maps

2009-11-07 Thread Leonardo Gomes
Hello, I'm feeding my working memory with Maps (unfortunately, this is a requirement and I can't use beans). To access the values in this maps I use the following MVEL expression : Map ( this["airportCode"] == "GIG" , this["numberOfPassengers"] > "1"

Re: [rules-users] Maintaining DB/Working Memory Synchronization

2009-11-07 Thread Andrew Waterman
I neglected to mention my reply is from the viewpoint of changing entities through the program that interacts with drools; if you need to sense changes from another source to entities/tables in a database Greg's suggestion seems the easiest and least resource intensive. Pushed actions from the dat

Re: [rules-users] Suppressing reciprocal matches

2009-11-07 Thread D Brock
Thanks Mark, sounds good. And the hashCode trick works. Wow, I would have never thought of that! Mark Proctor wrote: > > D Brock wrote: >> I have defined the following rule to detect when duplicate objects (in >> this >> example, Widgets) exist. This always produces two matches, and therefor

Re: [rules-users] Maintaining DB/Working Memory Synchronization

2009-11-07 Thread Andrew Waterman
It can depend on how you want to use working memory as well. If you are working statelessly, you can load objects through some type of transactional framework, insert them into memory (or the ones relevant to you at that moment in time) let Drools evaluate the objects, make changes and then serial

Re: [rules-users] Maintaining DB/Working Memory Synchronization

2009-11-07 Thread ken.p
I am also looking similar feature. We can currently use AOP to send event to stream. However, we have events with relevant duration for days and some time weeks. If server were to restart for maintenance, how do we restore to the same state? Daniel Miller-9 wrote: > > So I hope that someone ou

Re: [rules-users] Maintaining DB/Working Memory Synchronization

2009-11-07 Thread Dan Miller
Greg Barton yahoo.com> writes: > > I don't think there's a built in way to do this with drools, but in general this is done using database > triggers. The trigger fires when the data changes, and from there it's up to you how the record is > transported to working memory. > > If you use orac

Re: [rules-users] Suppressing reciprocal matches

2009-11-07 Thread Edson Tirelli
Yap, that or, in case you want to do it automatically for ALL your rules, you could use: KnowledgeBaseConfiguration conf = ... conf.setOption( RemoveIdentitiesOption.YES ); Javadocs: http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/KnowledgeBaseConfiguration.html

Re: [rules-users] Help needed - Problems with forall operator

2009-11-07 Thread Edson Tirelli
Yap, Wolfgang has the picture right. Just 2 clarifications: * A single pattern forall in Drools is a syntax sugar to a multi-pattern forall in the following way: forall( Pattern( ) ) => forall( $p : Pattern() Pattern( this == $p, ) In other words, drools uses the fact type to de

Re: [rules-users] Maintaining DB/Working Memory Synchronization

2009-11-07 Thread Wolfgang Laun
org.drools.event.WorkingMemoryEventListener would be the other option, now using changes to the Working Memory as the trigger to update the Data Base. If you intend using rules that modify WM contents, you may have to have this in addition to a DB change notification mechanism.-W On Fri, Nov 6, 20

Re: [rules-users] Help needed - Problems with forall operator

2009-11-07 Thread Wolfgang Laun
Here's the explanation why Tom's version does not work. The first pattern of a "forall" defines the domain, which is: all CreditReport facts; for each object in this domain, the remaining patterns must match; since the FICO pattern merely ascertains the existence of a single FICO chained to a paren