[rules-users] problem binding variable to map value

2012-02-09 Thread Ming Fang
Below is a very simple rule that binds a variable to a map value... rule "how many times is map.get() called?" when p:Parameter( $value:tags[1]==1, $value == 1, $value != 2, $value != null, $value in ("1","2") ) then

[rules-users] Your suggestions for rules for pretty simple problem

2012-02-09 Thread Jason Parekh
I'm new to constraint programming and Drools Planner. I've read through the docs and built some rules that would probably get me to the right answer, eventually :) I was hoping to get your suggestions for better concrete rules. The problem is I need to order items in a performance with the follo

[rules-users] Multiple threading

2012-02-09 Thread Apache
Hey, I am trying to get multiple threads to insert events and run rules against the union of events inserted ( an as soon as they are inserted, a timer drools thread kicking of fireallrules() is not an option because that would introduce a delay ) and wanted some opinion on the following: 1. St

Re: [rules-users] GUVNOR

2012-02-09 Thread Esteban Aliverti
Deploy the war Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2012/2/9 Olfa h > HI , > > how to install DROOLS Guvnor ? > > ___ > rules-users mailing list > rul

Re: [rules-users] Drools Guvnor

2012-02-09 Thread Michael Anstis
Download the WAR most applicable to the web/application server on which you wish to run it. Install according to the web/application server on which you are deploying it. On Tomcat this, for me, is simply using the Manager Application to install the Tomcat WAR. sent on the move On 9 Feb 2012 21

[rules-users] Drools Guvnor

2012-02-09 Thread olfa
Hi, how to install Guvnor? thank you -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-tp3730872p3730872.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@

[rules-users] GUVNOR

2012-02-09 Thread Olfa h
HI , how to install DROOLS Guvnor ? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Problem with package names and declare section

2012-02-09 Thread Wolfgang Laun
The NPE during insertion is highly suggestive of another problem. Even if there were two Event classes (one the pojo, the other one the declared one) there should not be a NPE; the "hello world" rule simply would not fire. Are all fields - especially eventName - properly initialized before that fac

[rules-users] Problem with package names and declare section

2012-02-09 Thread Joaquín Díaz Vélez
Hi guys, we are currently working with Drools Fusion in order to build a complex event processing solution. We've modelled our events using and object (Event) and this object is shared with everyone that needs to publish and event. Our scenario goes this way 1) Our shared

Re: [rules-users] Ruleflow: two flow exits (or equivalent?) from reusable sub-process?

2012-02-09 Thread grools
Thanks for the tip! I'd like to avoid cluttering the flowchart with decision gates. I tried to read up on event handling but the term "boundary event" that you are using (and especially how it is attached to the container process) eludes me :-( Can you or anyone expand a bit further on that suggest

Re: [rules-users] Low Date question in drools

2012-02-09 Thread Nancy Henggeler
Hello Wolfgang, I am going to include my project team members Tom, Lauren, and Graham on this as they are also helping me with this and might have a different question to ask of you that might help us. Thanks for your continued help with this. Nancy From: Wolfgang Laun To: Rules User

Re: [rules-users] Protection from malicious rules

2012-02-09 Thread Vincent Legendre
The "then" part is java. Your question can thus be reformulated as "preventing java code for doing dangerous operations". One of basic solution is to run your java code (containing drools or not) under a specific user (not root) that only have rights for some specific folders. As I think you a

Re: [rules-users] Low Date question in drools

2012-02-09 Thread Wolfgang Laun
Yes, it's strange. Now, if there is a Person object person and you have, for instance, person.setDateOfBirth( new Date( -1899, 0, 1 ) ) then the rule for matching this oldster would be rule "Methuselah" when $p: Person( dateOfBirth == "1-Jan-1" ) then ... The Date construc

Re: [rules-users] Low Date question in drools

2012-02-09 Thread Swindells, Thomas
One way would be to do dateOfBirth.time < nn Where n is (new Date(-1900, 1,1)).getTime() By the way be very very wary of Date objects coming back from the database and check what the actual implementation class type is (and not the variable type). Even though java.sql.Timestamp extends

[rules-users] Protection from malicious rules

2012-02-09 Thread Shur, Bob
We're considering a system in which partners could write and deploy their own rules, but we are worried about security. Is there any support for preventing harmful rules? For example: rule "bad" when then File f = new File("important.doc"); f.delete(); end

Re: [rules-users] Low Date question in drools

2012-02-09 Thread Nancy Henggeler
It is a java date. We use some java binding objects to build it. Below is just a sampling of this. The second entry below indicates what to name it in Java, it's java type, what DB2 table (cogentTable) and data field it is coming from (cogentField). The snippets below might not help much.

Re: [rules-users] Rule does not fire when JBPM asks to do so in BPMN 2.0 process

2012-02-09 Thread Alberto R. Galdo
2012/2/8 Esteban Aliverti > This is a tricky one :) Indeed it was! ;-) I've made the changes as sugested and it works like a charm. What you say about the process being created and executed *before* the correponding fact is inserted into the session now totally makes sense to me. Thank you v

Re: [rules-users] Low Date question in drools

2012-02-09 Thread Wolfgang Laun
So what is the Java type of dateOfBirth, please? -W 2012/2/9 Nancy Henggeler > Hello Laun, > > Thank you for your quick response. This date is a date coming from a DB2 > date field and is valid in my incoming data. Frankly, I am with you, why > not null versus a silly low date as such, arh

Re: [rules-users] How do I write a rule to detect a missing value in a group of facts?

2012-02-09 Thread Wolfgang Laun
2012/2/9 > Beautiful! > > How would a business user (non-programmer) write such a rule. > There's some evidence that it's difficult to "un-think" your procedural programming imprinting. A non-programmer might even have the edge over a programmer. But rule programming isn't a silver bullet - lots

Re: [rules-users] How do I write a rule to detect a missing value in a group of facts?

2012-02-09 Thread GPatel
Beautiful! How would a business user (non-programmer) write such a rule. The only way I can think of is create a dsl sentence for this specific condition - Original Message - From: Wolfgang Laun [wolfgang.l...@gmail.com] Sent: 02/09/2012 05:02 PM CET To: Rules Users List Subject: Re: [

Re: [rules-users] Low Date question in drools

2012-02-09 Thread Nancy Henggeler
Hello Laun, Thank you for your quick response. This date is a date coming from a DB2 date field and is valid in my incoming data. Frankly, I am with you, why not null versus a silly low date as such, arh. But since it is coming in as such do you know of a work around? Thank so much, Nan

Re: [rules-users] Low Date question in drools

2012-02-09 Thread Wolfgang Laun
Why would you want to test for January 1st in year 1? This is not a value an object of type java.util.Date can represent. See that type's javadoc for details, but the epoch begins January 1, 1970. -W On 9 February 2012 17:19, Nancy Henggeler wrote: > I have a simple rule where I want to bypass

[rules-users] Low Date question in drools

2012-02-09 Thread Nancy Henggeler
I have a simple rule where I want to bypass elements that have a low date but drools seems to be interpreting the date different then I am expecting. Drools statement and error follows: ClientSupplement ( dateOfBirth : dateOfBirth != null && != 0001-01-01) throws error -- Error: [Error: badly fo

Re: [rules-users] How do I write a rule to detect a missing value in a group of facts?

2012-02-09 Thread Wolfgang Laun
Don't think procedurally, just write the *rule* for a missing post ;-) rule "missing fence post" when FencePost( $d: distanceFromStart ) FencePost( distanceFromStart == $d + 2*FencePost.GAP ) not FencePost( distanceFromStart == $d + FencePost.GAP ) then System.out.println( "Missing

[rules-users] How do I write a rule to detect a missing value in a group of facts?

2012-02-09 Thread mikeg
I need to write a rule to identify a missing element in a group of facts. For example, let us say I want to ensure that my fence has a fence post every 8 feet. My fact declaration is as follows: declare FencePost identifier : String distanceFromStart: Long end If I add the following facts

Re: [rules-users] Auto-focus in Decision Table

2012-02-09 Thread shanmuga
Thank you Manstis... -- View this message in context: http://drools.46999.n3.nabble.com/Auto-focus-in-Decision-Table-tp3729585p3729704.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lis

Re: [rules-users] Auto-focus in Decision Table

2012-02-09 Thread Michael Anstis
No they are not the same but there was a bug that caused the AUTOFOCUS value to set the LOCK_ON_ACTIVE attribute. On 9 February 2012 14:47, shanmuga wrote: > Please Explain briefly > Is lock-on-active and auto-focus are same in XLS Decision table? > > -- > View this message in context: > htt

Re: [rules-users] Auto-focus in Decision Table

2012-02-09 Thread shanmuga
Please Explain briefly Is lock-on-active and auto-focus are same in XLS Decision table? -- View this message in context: http://drools.46999.n3.nabble.com/Auto-focus-in-Decision-Table-tp3729585p3729672.html Sent from the Drools: User forum mailing list archive at Nabble.com. _

Re: [rules-users] Auto-focus in Decision Table

2012-02-09 Thread Michael Anstis
Did you read the Bugzilla I linked to? On 9 February 2012 14:39, shanmuga wrote: > I ues XLS decision table only... > It works fine, but LOCK-ON-ACTIVE is placed instead of AUTO-FOCUS while I > using AUTO-FOCUS in the Decision Table. Can you help me > > -- > View this message in context: > h

Re: [rules-users] Auto-focus in Decision Table

2012-02-09 Thread shanmuga
I ues XLS decision table only... It works fine, but LOCK-ON-ACTIVE is placed instead of AUTO-FOCUS while I using AUTO-FOCUS in the Decision Table. Can you help me -- View this message in context: http://drools.46999.n3.nabble.com/Auto-focus-in-Decision-Table-tp3729585p3729654.html Sent from t

Re: [rules-users] Auto-focus in Decision Table

2012-02-09 Thread Michael Anstis
Please explain more fully. If you are using XLS decision tables the problem you might be experiencing might relate to https://bugzilla.redhat.com/show_bug.cgi?id=744779 It was included in 5.4.0.beta2. On 9 February 2012 14:17, shanmuga wrote: > Hi All, > How to use *auto-focus* in deci

[rules-users] Auto-focus in Decision Table

2012-02-09 Thread shanmuga
Hi All, How to use *auto-focus* in decision table? Is *LOCK-ON-ACTIVE* and *AUTO-FOCUS* both are same in Decision table? Please explain briefly. -- View this message in context: http://drools.46999.n3.nabble.com/Auto-focus-in-Decision-Table-tp3729585p3729585.html Sent from the Drools

Re: [rules-users] PermGen space error

2012-02-09 Thread Geoffrey De Smet
Hi Joe, Thanks for correcting me. This image indeed proves your point: http://java.sun.com/docs/hotspot/gc5.0/fig4.gif As well as this thread: http://www.velocityreviews.com/forums/t683307-question-on-xms-xmx-and-xx-maxpermsize-in-jvm-start-parameter.html Very interesting, I had it wrong f

Re: [rules-users] PermGen space error

2012-02-09 Thread Joe Ammann
On 02/09/2012 09:34 AM, Geoffrey De Smet wrote: > The perm gen space is a subset of the heap space. > So it doesn't make sense to put them on the same value. > > Try this instead: > -Xmx1024m -XX:MaxPermSize=512m > Or, if that fails: > -Xmx2048m -XX:MaxPermSize=1024m > Sorry to disagree Geo

Re: [rules-users] Truth maintenance and RHS variables

2012-02-09 Thread juankera
Ok, i was working on cleaning the code and i've found the reason (now it will be great to understand why :)) As i'm working with code from an open source platform, i have these lines in my example: KnowledgeAgentConfiguration aconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration(); aconf.s

Re: [rules-users] Migrating repository data from Drools 5.0 to 5.3Final

2012-02-09 Thread Michael Anstis
You can get a build containing the fix from Nexus: https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.drools~guvnor-webapp~5.3.2-SNAPSHOT~~ 2012/2/8 jian zhi > Mike, > > Is it possible to release a patch of 5.3? > > Thanks, > Jian > > -- > *From:* M

Re: [rules-users] Drools Debugging

2012-02-09 Thread Swindells, Thomas
Use salience or some other order to control the facts. But I think the key point to remember is that Drools isn't stable, given the same set of rules and the same set of input in the same order there is no guarantee that the rules will execute in the same order unless there is something in the r

Re: [rules-users] PermGen space error

2012-02-09 Thread Geoffrey De Smet
The perm gen is the place where all your Java class files live in memory (and each DRL file generates a Java class file). The perm gen space is a subset of the heap space. So it doesn't make sense to put them on the same value. Try this instead: -Xmx1024m -XX:MaxPermSize=512m Or, if that fai