Re: [rules-users] Accepted idiom for binding variable to restriction?

2010-06-03 Thread Giovanni Motta
Why not use from? The manual suggest this approach to reason over data that is not explicitly asserted in knowledge base. It seems to me that it fits best in the requirement of Laird. Please correct me if this is bad practice: $response: Response() $question: Question(ID == XYZ) from

[rules-users] Drools 5.1.M1 with JBoss AS 5.X

2010-06-03 Thread fgadrat
Hello All, Drools 5.1.M1 is bundled with a JBoss 4.2.3 GA in download section, ok I red http://community.jboss.org/wiki/DroolsGuvnor50inJBossAS5 info but just wanted to get on the safe side: Has it been tested/validated to get Drools 5.1.M1(Guvnor) to be used and deployed over a JBoss

Re: [rules-users] Using pipelines

2010-06-03 Thread Swindells, Thomas
I tried looking for one but couldn't see one in the PipelineFactory that can be used when I've received an object from the jms queue. I'm hoping that I'm just being blind or something... From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mark

Re: [rules-users] Using pipelines

2010-06-03 Thread Mark Proctor
On 03/06/2010 11:05, Swindells, Thomas wrote: I tried looking for one but couldn't see one in the PipelineFactory that can be used when I've received an object from the jms queue. I'm hoping that I'm just being blind or something... I'd not use that, stick with the CommandFactory and send

[rules-users] Firing a rule if at least its two conditions are satified

2010-06-03 Thread skasab2s
Hello, we are using Drools in our company. We have a rule with three conditions in this format: when Condition A Condition B Condition C then execute Action 1 Now we have a situation, in which the rule should fire if AT LEAST two of the three conditions are satisfied. Do

Re: [rules-users] Using pipelines

2010-06-03 Thread Swindells, Thomas
Ah, that was next in my list of technologies to look at anyway so I guess I'll just look at camel and forget about the pipeline stuff. Are there any good starting points/examples that are worth studying? Thanks, Thomas From: rules-users-boun...@lists.jboss.org

Re: [rules-users] Firing a rule if at least its two conditions are satified

2010-06-03 Thread PAYET, Manuel
If I were you, I'd use something like Global java.lang.Integer cnt; Rule before everything Salience 10 When Eval(true) Then Cnt=0 End Rule condition A When condition A Then cnt=cnt+1; End Rule condition B When condition B Then cnt=cnt+1; End Rule condition C When condition B Then

Re: [rules-users] Firing a rule if at least its two conditions are satified

2010-06-03 Thread Tihomir Surdilovic
IMO you can just use activation groups and not have to deal with incrementing, something like: rule first activation-group myactgrp when Condition A Condition B then ... end rule second activation-group myactgrp when Condition A Condition C then ... end rule third

Re: [rules-users] Firing a rule if at least its two conditions are satified

2010-06-03 Thread PAYET, Manuel
Yes, you're right Tihomir Surdilovic your solution is way more elegant than mine. And to skasab2s: you should use a function to avoid copy and paste three time the same then clause De : rules-users-boun...@lists.jboss.org

[rules-users] Error reading brl files in eclipse

2010-06-03 Thread Fnu Mahalakshmi
Hi, I know this is repeated again but I tried the solution mentioned in the previous posts and it doesn't work. When I created a guided rule in eclipse, I get blank dropdowns when choosing the facts. I added the jar file for the classes as an external reference I also added a .package file to

Re: [rules-users] Firing a rule if at least its two conditions are satified

2010-06-03 Thread Greg Barton
This will not work. Rules will not predictably react to changes in global variables. Use an object in working memory. GreG On Jun 3, 2010, at 7:15, PAYET, Manuel manuel.pa...@capgemini.com wrote: If I were you, I'd use something like Global java.lang.Integer cnt; Rule before everything

Re: [rules-users] Firing a rule if at least its two conditions are satified

2010-06-03 Thread PAYET, Manuel
The solutions given are useable anyway, Thanks for this information GreG -Message d'origine- De : rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] De la part de Greg Barton Envoyé : jeudi 3 juin 2010 15:29 À : Rules Users List Objet : Re: [rules-users]

Re: [rules-users] Firing a rule if at least its two conditions are satified

2010-06-03 Thread PAYET, Manuel
By the solutions given I didn't mean to tell mine was good, apparently it's not, I was talking about the other ones. -Message d'origine- De : rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] De la part de PAYET, Manuel Envoyé : jeudi 3 juin 2010 15:33 À :

Re: [rules-users] Accepted idiom for binding variable to restriction?

2010-06-03 Thread Edson Tirelli
For simple constraints like this, using nested accessors is lighter and simpler than using from. Edson 2010/6/3 Giovanni Motta motta...@gmail.com Why not use from? The manual suggest this approach to reason over data that is not explicitly asserted in knowledge base. It seems to me that

Re: [rules-users] Accepted idiom for binding variable to restriction?

2010-06-03 Thread Evert Penninckx
Edson Tirelli-3 wrote: For simple constraints like this, using nested accessors is lighter and simpler than using from. Phrases like this should go in a drools best practice sections :-) Does something like that exist? When you read the docs, you get the impression that from is the

Re: [rules-users] Firing a rule if at least its two conditions are satified

2010-06-03 Thread Moe Alkhafaji
I had to do something like this. The way I did it is by prividing a method in my object in working memory that takes multiple Boolean conditions and loops through them and return true if at least N of the conditions were true. So, this funtions will take N and a list of all conditions.

[rules-users] Ordering of collected elements

2010-06-03 Thread sjoo822
Hi, I have a rule with the condition that looks like below: when item : Item() list : ArrayList(size 0) from collect ( SubItem( type == X ) from item.getSubItemList()) When I execute this rule, it seems to me that the order of elements in the collected list is not the same as they

[rules-users] Object Referencing error:

2010-06-03 Thread Fnu Mahalakshmi
Hi, I am getting the following error when I try to do complex object referencing in drools: My class: A{ String Type; B objectb; //getters and setters for above } My rules: rule prod when $a :A(Type == Prod , objectB != ) then B bobject = new B(); bobject.setType( Prod

[rules-users] Use Drools-Guvnor .pkg

2010-06-03 Thread Josua
Hi, I’m new to drools, just started evaluating Drools-Guvnor for a project. To take advantage of Java-enums I’m using the current 5.1.0 Milestone 2. I created a decision table (web-guided) in drools-guvnor and deployed the package snapshot, which is downloadable and returns a .pkg-File. This

Re: [rules-users] Object Referencing error:

2010-06-03 Thread Esteban Aliverti
You can't modify bobject, becuase it doesn't exist inside the session. You just created it a few lines above. Maybe you need an insert() or maybe you need the bobject reference from the LHS. Something like this: *rule* prod *when* $a :A(Type == Prod , objectB != ) *then*

Re: [rules-users] Use Drools-Guvnor .pkg

2010-06-03 Thread Esteban Aliverti
Indeed, the change set is an xml file specifying the resources to add/modify/remove. Take a look at the change set structure here: http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e788

Re: [rules-users] Object Referencing Error

2010-06-03 Thread Esteban Aliverti
@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti -- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100603/f0f29ddf