Re: [rules-users] Class test fails (!= same as ==)

2012-03-13 Thread Wolfgang Laun
This has been fixed someplace on the way to 5.4.0 - it works correctly in 5.4.0.Beta2 -W On 12/03/2012, Wolfgang Laun wolfgang.l...@gmail.com wrote: Using 5.3.0.Final, arbitrary facts and the rule shown below: import org.drools.reteoo.InitialFactImpl rule Clear when $f: Object()

Re: [rules-users] Designer 2.1 install doubts

2012-03-13 Thread Tihomir Surdilovic
On 3/13/12 12:03 AM, Cristiano Gavião wrote: Hi again, Well, I already did this before. But now I've discovered that its working when called from a file inside a guvnor package. but not directly in the browser.. But I got a error that prevents the model (see the attached picture) saved

Re: [rules-users] Designer 2.1 install doubts

2012-03-13 Thread Cristiano Gavião
Yep, draging the Reusable Subprocess from the stencil resolve the issue... I could save and reopen the diagram properly. I got really impressed with the improvements... congratulations for the excellent job !!! cheers On 13/03/12 07:06, Tihomir Surdilovic wrote: On 3/13/12 12:03 AM,

Re: [rules-users] Setting Non-global Input Variable in ACTION Clause

2012-03-13 Thread mihajlo
Sorry, I meant input :=) I figured this was possible, as this is how a typical rule engine works. However I am struggling with the correct syntax for doing this with a decision table in Drools. I basically have a table in which I want to modify a fact in the ACTION clause that had not been

Re: [rules-users] Setting Non-global Input Variable in ACTION Clause

2012-03-13 Thread Michael Anstis
Generally speaking, if a Fact has not been referenced in the CONDITION it cannot be MODIFIED in the ACTION. You can either:- - Reference in the CONDITION and MODIFY in the ACTION, or - CREATE in the ACTION You do not need to define any constraints on a Fact you reference in the CONDITION.

[rules-users] logicalInsert and construction of an inferred fact.

2012-03-13 Thread devan.vanree...@gmail.com
Hi there, Kindly assist. I am playing around with Inference and Truth maintenance I have 2 questions. 1) When doing a logicalInsert() in the consequence of a rule - is this the same as doing a insertLogical()? The reason I ask is that when creating rule in Guvnor it doesnt recognize

Re: [rules-users] logicalInsert and construction of an inferred fact.

2012-03-13 Thread Wolfgang Laun
On 13 March 2012 16:57, devan.vanree...@gmail.com devan.vanree...@gmail.com wrote: Hi there, Kindly assist. I am playing around with Inference and Truth maintenance I have 2 questions. 1) When doing a logicalInsert() in the consequence of a rule - is this the same as doing a

Re: [rules-users] logicalInsert and construction of an inferred fact.

2012-03-13 Thread Michael Anstis
Yes, you will need to perform something like this in the RHS of a rule:- MyFact mf = new MyFact(); insertLogical( mf ); On 13 March 2012 16:23, devan.vanree...@gmail.com devan.vanree...@gmail.com wrote: Thanks for your response, I picked it up from the following link the

Re: [rules-users] NPE in FireAllRulesCommand (bug?)

2012-03-13 Thread Mike Melton
JBRULES-3421 created and pull request submitted with fix and tests. On Fri, Mar 2, 2012 at 1:57 PM, Mike Melton mike.mel...@gmail.com wrote: Drools 5.3.1.Final. I have a use case where I am executing a BatchExecutionCommand against a stateless session. One of the sub-commands is a

Re: [rules-users] logicalInsert and construction of an inferred fact.

2012-03-13 Thread Wolfgang Laun
On 13 March 2012 17:23, devan.vanree...@gmail.com devan.vanree...@gmail.com wrote: Thanks for your response, I picked it up from the following link the http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html/ch02.html#d0e795 This will have to be corrected. In terms of

Re: [rules-users] logicalInsert and construction of an inferred fact.

2012-03-13 Thread devan.vanree...@gmail.com
Thanks for your help. -- View this message in context: http://drools.46999.n3.nabble.com/logicalInsert-and-construction-of-an-inferred-fact-tp3822594p3822857.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users

Re: [rules-users] [Drools Planner] Hard constraint appears to be ignored - How to isolate a working memory corruption in drools expert

2012-03-13 Thread Reinis
Sorry to re-activate this thread, but I was thinking and discussing a lot on this topic (thanks Sotty and Geoffrey). And I am still in doubt even after the explanation from Wolfgang. Until now I think there are more interpretations on how it might be instead of explicit explanation. Of course

[rules-users] drools arithmetics without eval()

2012-03-13 Thread fx242
I have a question regarding eval() use. My rulebase is around ~3k rules, most of them are auto-generated by templates, and they end up looking like this: rule CONFIG_114 salience 0 when client: Client() contextProd: PortfolioProduct(prodAdded == true, productId == PROFESSIONAL)

Re: [rules-users] drools arithmetics without eval()

2012-03-13 Thread Wolfgang Laun
You can rewrite this rule like this (if I managed to juggle the inequality correctly): client: Client() contextProd: PortfolioProduct(prodAdded == true, productId ==PROFESSIONAL) Number(qty_1: intValue* == 1* ) from accumulate(pp: PortfolioProduct(productId in (BOX_001), prodAdded ==

[rules-users] Avoid propagation of update in a then block.

2012-03-13 Thread Patrik Dufresne
Hi, I have some trouble to figure out how to stop / start the propagation of updates within a Then block. Here is a snippet to represent the problem I have. rule my-rule when $objects : List() from accumulate( $entity : Entity(closed==false), collectList($entity) )

Re: [rules-users] Avoid propagation of update in a then block.

2012-03-13 Thread Mike Melton
Let the rule engine do what it does best. You are fighting against the optimizations of the engine by trying to control the flow. You can rewrite your rule as rule my-rule when $entity : Entity( closed == false ) then modify($entity) { setClosed(true); } end The rule will fire (once) for

[rules-users] Problem with temporal operations spanning daylight to standard time

2012-03-13 Thread lhorton
Most of the USA went from Standard Time to Daylight Time this past weekend. We use some of the temporal operations in our rules, mainly to do calculations of date differences by whole days, and some of the calculations are wrong. The ones in error involve comparing dates where one is standard

Re: [rules-users] Avoid propagation of update in a then block.

2012-03-13 Thread Patrik Dufresne
Hi Mike, I see your point, it's very valid for the snippet rule, but can't be apply to the real one since I need to run a function using eval(). Patrik Dufresne On Tue, Mar 13, 2012 at 4:45 PM, Mike Melton mike.mel...@gmail.com wrote: Let the rule engine do what it does best. You are

Re: [rules-users] Avoid propagation of update in a then block.

2012-03-13 Thread Mike Melton
Sorry - I didn't have the time earlier to fully parse the more complex rule. The problem you're having is that the engine reevaluates the conditions on each working memory change, and since, as you noticed, the list has changed, the rule fires again. The no-loop attribute prevents a rule from

Re: [rules-users] Avoid propagation of update in a then block.

2012-03-13 Thread Mike Melton
I just realized that I changed my mind on implementation mid-post and misled you a bit. You do *not* need a special implementation of Map since you are never reasoning over it; the accumulate rule consequence decomposes the map results into DfsSearchResult facts. So replace any references to