Re: [rules-users] Decision Table column testing for exists

2012-06-21 Thread Wolfgang Laun
n:Number((n.intValue()0)==$param) from accumulate( FeV1(), count(1) ) -W On 20/06/2012, Hrumph herman.p...@imail.org wrote: Hi. I'm trying to figure out how to express a Condition that does the following: Column name: FeV1 exists Possible values: true, false, n/a I wish to test for

Re: [rules-users] Decision Table column testing for exists

2012-06-21 Thread Wolfgang Laun
As an alternative that avoids the unnecessary counting of FeV1, consider adding a helper fact type and a couple of (DRL) rules. declare Existence value: boolean end rule not2exists when exists FeV1() $e: Existence( value == false ) then modify( $e ){ setValue( true ) } end rule

Re: [rules-users] Drools Planner changing problem fact (2D bin packing with related dimension and continuous values)

2012-06-21 Thread Geoffrey De Smet
Good point Wolfgang, If the use case allows (or even demands) for discretizing the locations and putting in on a grid, that should definitely be done. For example, putting cargo on an airplane is also a bin packing problem, but because the cargo items need to be attached to the airplane, so

Re: [rules-users] Drools Planner changing problem fact (2D bin packing with related dimension and continuous values)

2012-06-21 Thread Ralph S.
Hi Geoffrey, Wolfgang, sure is the problem discretized (the layer on which it should be packed is fixed size say 100cm x100cm and the rectangles have sizes to the cm) , that was not the question. I can build a planning value x/y with a list of 100 entries for every cm and combine them, but i

[rules-users] Implementing Rete View in JPanel

2012-06-21 Thread Avirail
Good Morning, i have a question about the Rete View. I want to implement the Graph at a JPanel in a Java Programm and want to ask if there is a paint funktion or a other posibility to do this. I using Drools Expert and have a .drl file where to read the data. The Graph is based on JUNG (sais

Re: [rules-users] drools-planner drl file help

2012-06-21 Thread Vincent LEGENDRE
... Should I repeat what Geoffrey told you in your previous thread ? Will you try again and again to post your project, hoping we will do your work for you ? I gave you the main ideas, first work with that, and come back with precise questions. - Mail original - De: Ricardo

[rules-users] issue with date comparison

2012-06-21 Thread sumatheja
Hi, I've a fact which is retrieved from database using hibernate. The date format that comes in is -mm-dd, java.util.Date. The fact has two variables *startDate* and *endDate. *I want to check if the the *current date* lies between these two. Since the current date is not constant I'm

[rules-users] Accumulator being executed depending on the number of events

2012-06-21 Thread e...@yahoo.com
Hi, I'm experimenting with Drools and have troubles understanding the way accumulators work. Before i go and look at the source code i was wondering if the way the accumulators work is designed as described below or of it has something to do with my rules configuration. I'm using drools

Re: [rules-users] issue with date comparison

2012-06-21 Thread Wolfgang Laun
On 21/06/2012, sumatheja sumath...@gmail.com wrote: Hi, I've a fact which is retrieved from database using hibernate. The date format that comes in is -mm-dd, java.util.Date. The fact has two variables *startDate* and *endDate. *I want to check if the the *current date* lies between

[rules-users] Not able to debug Drools Rules

2012-06-21 Thread Annie
Hi, I am using 'drools-distribution-5.4.0.Final' and 'eclipse helios 3.6.2' . I have created a simple example using rules, it runs correctly but when trying to debug it as drools application I got the following error in 'error log' : Plug-in 'com.google.gwt.eclipse.core' contributed an

Re: [rules-users] Accumulator being executed depending on the number of events

2012-06-21 Thread Wolfgang Laun
On 21/06/2012, e...@yahoo.com e...@yahoo.com wrote: Hi, I'm experimenting with Drools and have troubles understanding the way accumulators work. Before i go and look at the source code i was wondering if the way the accumulators work is designed as described below or of it has something to

Re: [rules-users] Accumulator being executed depending on the number of events

2012-06-21 Thread e...@yahoo.com
Hi Wolfgang, thanks for the swift reply. Probalby you are right about the fact that a new context is created instead of a new accumulator. But why is it looping over all the context that are created for that accumulator? Surely the output attached to the first thread is not what you would

Re: [rules-users] Accumulator being executed depending on the number of events

2012-06-21 Thread Wolfgang Laun
On 21/06/2012, e...@yahoo.com e...@yahoo.com wrote: Hi Wolfgang, thanks for the swift reply. Probalby you are right about the fact that a new context is created instead of a new accumulator. But why is it looping over all the context that are created for that accumulator? Think logically.

Re: [rules-users] Planner and domain modeling

2012-06-21 Thread ge0ffrey
Yes, you're right: it's because of performance reasons during incremental score calculation. If a CloudComputer changes during planning too, it should be set as dirty in Drools by Planner calling (workingMemory.modify(computer)). If the whole computer is made dirty, that has a serious effect on

[rules-users] Guvnor with postgres 9

2012-06-21 Thread swilsey
Trying to get Guvnor working with Postgres 9 and it is throwing an error stating that auto commit is enable. Any thoughts on what the issue might be? -Scott -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-with-postgres-9-tp4018143.html Sent from the Drools: User

Re: [rules-users] simple subtraction in drools 5.3 fires rules

2012-06-21 Thread oranoh
I moved to 5.4 and now it works ! -- View this message in context: http://drools.46999.n3.nabble.com/simple-subtraction-in-drools-5-3-fires-rules-tp4018141p4018144.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___

[rules-users] Setting unused globals on a session

2012-06-21 Thread gqmulligan
I save many different knowledge packages for different accounts to a database. Most accounts use a particular service to pull data from the database but not all of them. Because of this I wanted to set this service as a global on the session. However, because not all accounts use the service I

Re: [rules-users] Setting unused globals on a session

2012-06-21 Thread Vincent LEGENDRE
I am not sure to have fully understood you last requirement, nor if you set the global inside or outside the rules. Anyway, I see these options : - declare your globals for all packages, but it seems that this is not what you want - enclose the global setting in a try...catch and just

Re: [rules-users] Setting unused globals on a session

2012-06-21 Thread gqmulligan
Either your second or third option sounds like what I want to do. Sorry for the confusing last requirement. I was trying to say that I want to use spring to inject all globals and then set them on the session without explicitly having to look them up inside each rule. If I wanted to go this

Re: [rules-users] drools-planner drl file help

2012-06-21 Thread Ricardo
I am not asking any one to do my work I am just asking help in the mailing list. From you reply I misunderstood that you were asking more info that's why I send the file. any way thanks for your help and nice comments. - with kind regards, -- View this message in context:

Re: [rules-users] simple subtraction in drools 5.3 fires rules

2012-06-21 Thread gqmulligan
Drools says property accessors must not change the state of the object so I'm guessing your second example is not the correct way to do it in either drools version. Out of curiosity do things work right if you remove the ruleflow-group on your first rule in Drools 5.3? -- View this message in

Re: [rules-users] simple subtraction in drools 5.3 fires rules

2012-06-21 Thread George
Your first rule did not fire for me as expected using drools 5.3. Please ignore my previous post. oranoh olaf.raet...@emerson.com wrote: I have a simple class public class Dummy { private int x1, x2, y1, y2; public Dummy(int x1, int y1, int x2, int y2) {

Re: [rules-users] simple subtraction in drools 5.3 fires rules

2012-06-21 Thread gqmulligan
I am very sorry for all of my nonsense. My Drools was for some reason having an issue with the ruleflow-group and after I removed it my first rule behaved as yours and fired when it shouldn't have. I know you are probably just going to stick with version 5.4 but if you put a space between the -

Re: [rules-users] Planner and domain modeling

2012-06-21 Thread ge0ffrey
Garf wrote Ah, I see. It would be handy to update the docs to clarify such (is there a community wiki around?) Not sure. Normally, I'd like to document as much as possible, but I 'd rather leave this one undefined for now and see how people solve, instead of pushing people into a certain