Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-21 Thread pdario
Davide Sottara wrote FYI, one of the next releases will include a new feature, called defeasibility, which is specifically designed for situations where higher ranking rules are allowed to override the consequence of other rules. We have an initial prototype working, but it will take a few

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-19 Thread pdario
laune wrote I'm confident that there's a clean and manageable way of preparing this data to work in combination with a small and constant set of rules. I refrain from elaborating this in all details without knowing all of the requirements. I'll try to summarize them as properly as I can...

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-19 Thread pdario
A lot to think about, it will take a little time to dissect this. Thank you! -- View this message in context: http://drools.46999.n3.nabble.com/Evaluate-rules-for-multiple-facts-of-the-same-type-within-a-StateuflSession-tp4022157p4022476.html Sent from the Drools: User forum mailing list

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-18 Thread pdario
Hello, the tinting example from the whitepaper assumes each Tint fits exactly one Param, right? This is not my case, as a Cart can match different discounts and we want to assign the highest possible. Is the pattern still suitable? Another thing I see is Param is evaluating plain attributes from

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-18 Thread pdario
laune wrote There is always just one fit; it just seems that there are multiple fits - when you define your individual cases sloppily. Well, this is an assumption to get a completely disjointed classification, but this is not my case. I have a first level discount if you pay online and a

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-13 Thread pdario
Well, so how can I make this rule fire for each fact? My scenario is: - different rules in the same activation-group to assign discount to the shopping cart - different activation-group to manage different discount policies - each rule has different salience to be sure only the most relevant one

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-13 Thread pdario
I'm sorry, it's not clear. Do you mean I have to add a condition in each rule to check whether other discount have been already applied? Even so, I can I control the preferred order of the discounts without salience? Do I have to put negated conditions of each rule?? It looks cumbersome... --

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-13 Thread pdario
@FrankVhh It looks ok to have a no other reductions are applied as a blocker, I find cumbersome to repeat all the conditions of other rules negated. Anyway, I'll try to summarize my situation: rule 20% discount salience 0 effective 1st Feb - 28th Feb activaction-group online discounts when

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-13 Thread pdario
@ part was just for your remark on cumbersomeness... I'm now reading the linked whitepaper. It's not easy for me to see how your example is easier than mine solution. I acknowledge salience redistribution would be a problem, that's why I kept them separated and kept salience values meaningful

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-13 Thread pdario
I'm trying to understand this Param pattern, but I miss the Java calling for it: will I need to put the effective values in the Java code instead of the rule file? Can you elaborate a little about this? Take the Example 3 of your whitepaper: where are literals 0, 10 and red from the Example 2?

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-12 Thread pdario
Can anybody help? -- View this message in context: http://drools.46999.n3.nabble.com/Evaluate-rules-for-multiple-facts-of-the-same-type-within-a-StateuflSession-tp4022157p4022236.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-11 Thread pdario
Here I am, I found what's wrong, but I don't understand if this is the expected behavior. In my test rule I added activation-group TEST to isolate it form other rules I had in the file; I also deleted all the other rules for testing, not thinking the activation-group attribute would cause any

[rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-08 Thread pdario
Damn, I can't! Simple rule rule TEST dialect mvel when s : String() then System.out.println(s); end Java Test StatefulKnowledgeSession s = ... s.insert(ONE); s.insert(TWO); s.fireAllRules(); s.dispose(); Output TWO What the...??? Using v5.4.0.Final -- View this message in context:

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-08 Thread pdario
Can you suggest a way to diagnose what's going wrong? I added DebugAgendaEventListener and DebugWorkingMemoryEventListener, but the output is too confusing for me -- View this message in context:

Re: [rules-users] Evaluate rules for multiple facts of the same type within a StateuflSession

2013-02-08 Thread pdario
I'll try to make it; in the meanwhile, do you find this meaningful? ==[ActivationCreatedEvent: getActivation()=[Activation rule=TEST, act#=0, salience=0, tuple=[fact 0:1:30100654:78406:1:DEFAULT:ONE] ], getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@4703c]

Re: [rules-users] How to pass a global reference date to rules

2013-02-07 Thread pdario
Yes, I understood it stays still, that should not be a problem for me. Thank you -- View this message in context: http://drools.46999.n3.nabble.com/How-to-pass-a-global-reference-date-to-rules-tp4022057p4022112.html Sent from the Drools: User forum mailing list archive at Nabble.com.

[rules-users] How to pass a global reference date to rules

2013-02-05 Thread pdario
Hello, I need to have my rules reason with a reference date different than today (so I can't use the rule attributes date-effective, date-expires). I declared a global java.utile.Date, I set it in Java, but I cannot reason on it... I don't want to put in each rule a generic Date fact. What do

Re: [rules-users] How to pass a global reference date to rules

2013-02-05 Thread pdario
I see, I'll have a look at the classes you mention. But what if I need to calculate a time difference from today to another date (say order expire date)? Would a new Date() in the rules give me the pseudo time? Thank you! -- View this message in context:

Re: [rules-users] How to pass a global reference date to rules

2013-02-05 Thread pdario
Moreover, it seems getSessionClock is for Statefull sessions only, but I'm working with Stateless ones. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-pass-a-global-reference-date-to-rules-tp4022057p4022067.html Sent from the Drools: User forum mailing list archive

Re: [rules-users] How to pass a global reference date to rules

2013-02-05 Thread pdario
I'm following your suggestions, I think I can go with them. Thank you -- View this message in context: http://drools.46999.n3.nabble.com/How-to-pass-a-global-reference-date-to-rules-tp4022057p4022082.html Sent from the Drools: User forum mailing list archive at Nabble.com.

[rules-users] How to enforce dependecy rules

2009-11-27 Thread pdario
Hello, I need some help to understand how to enforce dependency rules with Drools. Suppose you have two objects - A and B - and two business rules that say: if A is selected, unselect B and if B is selected, unselect A. How can I be sure that Drools unselects B when user selects A and