[rules-users] Example for using globals in Drools3.0.6

2007-05-29 Thread Joj
Hi, In the document, its written that "They are typically used to return data" under globals section. How can I return a global value to the calling method? In other words, how can I receive it in Java code? Can anybody explain with a simple example? And please identify the changes required if I

Re: [rules-users] "Or" and Collect

2007-05-29 Thread Dirk Bergstrom
Edson Tirelli was heard to exclaim, On 05/29/07 17:13: > $badBugs : List() from > collect( Bug( (devOwner memberOf $group || supportOwner memberOf $group), > severity == "hair-on-fire" ) > And use || and && for connecting constraints > and "and" and "or" for connecting CE's. Ahh, ok. Fro

Re: [rules-users] DSL to DRL File Conversion - Is it possible ?

2007-05-29 Thread kingston
Hi Mark , Can you just help me in converting this drl to dsl. ? How do i break lines in DSL involving OR conditions.? "[when]-" works for AND conditions . Do i really need give some english text (DSL mapping) for each line of the when condition when i use "[when]-" //Sample drl file. package

[rules-users] Two Doubts

2007-05-29 Thread Joj
Hi, I have two doubts : 1) Can't we use mathematical operations like average, sum, max, min, etc on the LHS of rule? If, how can I use it? Please show me an example. 2) Can't we manipulate - add and lookup - on a List object on LHS and RHS? If possible, how can I do it? Please describe using a

[rules-users] About Decision table

2007-05-29 Thread kranthikumar dalai
Hi to all, we wrote some rules as follows package com.leave import com.leave.paternity; rule "Paternity Approved" salience 1000 when paternity : paternity(gender == 'male',status =='married',role =='permanent',tenure <= 2,year == 1,applied ==2); then paternity.eligible = 2; paternity

Re: [rules-users] Re: JBRMS Query, very imp for me

2007-05-29 Thread Fernando Meyer
Howdy jagaran, Can you please give me some informations about your application environment? are you running on jboss AS, tomcat or jetty ? regards Fernando Fernando Meyer [EMAIL PROTECTED] GPG: 5A6D 3374 B055 A513 9A02 A03B 3DB3 7485 D804 DDFB On May 30, 2007, at 12:54 AM, jagaran das wr

[rules-users] Re: JBRMS Query, very imp for me

2007-05-29 Thread jagaran das
Hi Mark, You are right I would try to use Hibernate to store data in MySql. But I have a different problem. For creating rule package through JBRMS I have done following stuffs: The project is really great. but i am unable to download the binary package. The steps followed by me is as below: 1. c

Re: [rules-users] Double

2007-05-29 Thread Mark Proctor
That's what modify does, it retracts the fact and then asserts it. Mark Matthew Shaw wrote: Hi Scott, My understanding is that the rule will only fire twice regardless because there are only two "SheetTotal" objects in working memory which is stopping the rule from going into infinite recursion

RE: [rules-users] Double

2007-05-29 Thread Matthew Shaw
I think I understand what's going on finally. At first parse of the rule the engine is seeing that all conditions are met and adding to a tuple. On calling modify I think two things are happening. 1. The DutyHourTotal object has changed and it is infact adding it to the tuple. 2. But it is then

RE: [rules-users] Double

2007-05-29 Thread Matthew Shaw
Hi Scott, My understanding is that the rule will only fire twice regardless because there are only two "SheetTotal" objects in working memory which is stopping the rule from going into infinite recursion. The no-loop attribute is also behaving correctly as it is not letting the engine add it bac

Re: [rules-users] Double

2007-05-29 Thread Scott Reed
Matthew Shaw's message received 5/29/2007 9:39 PM: ok point taken. I have modified my rule so that it looks at an object and I modify a property on that object instead as follows: But still the same issue. * * *rule* "sum higher rate totals" *salience* 970 *no-loop* *true* *when* timeshe

RE: [rules-users] Double

2007-05-29 Thread Matthew Shaw
ok point taken. I have modified my rule so that it looks at an object and I modify a property on that object instead as follows: But still the same issue. rule "sum higher rate totals" salience 970 no-loop true when timesheet : TimesheetTransferObject( ) total : SheetTotalTransferObject($ih

Re: [rules-users] Double

2007-05-29 Thread Scott Reed
Matthew Shaw's message received 5/29/2007 8:20 PM: Why is it seeing it as a new object? I am asserting it into the working memory before hand. It says "new" right in the code: highDutyTotal = **new** Double(...); You asserted some other object which the predicate [art of the sets hidgDutyTotal

Re: [rules-users] Double

2007-05-29 Thread Mark Proctor
It's standard java pass by reference stuff: String a = "xxx"; String b = a; System.out.println( b ); // gives "xxx" a = ""; System.out.println( b ); // still gives "xxx" Mark Matthew Shaw wrote: Why is it seeing it as a new object? I am asserting it into the working memory before hand. --

RE: [rules-users] Double

2007-05-29 Thread Matthew Shaw
Why is it seeing it as a new object? I am asserting it into the working memory before hand. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Proctor Sent: Wednesday, 30 May 2007 1:27 AM To: Rules Users List Subject: Re: [rules-users] Double h

Re: [rules-users] "Or" and Collect

2007-05-29 Thread Edson Tirelli
Hey Dirk, Trunk already supports || and && without sub-rule generation. rule "severe bugs for which a member of your group is dev or support owner" when $group : UserGroup( ) $badBugs : List() from collect( Bug( (devOwner memberOf $group || supportOwner memberOf $group),

Re: [rules-users] Extracting an boolean variable

2007-05-29 Thread Rahul Phadnis
Does your Fact object have the isbooleanVariableName() method? The variable values are extracted using Java Bean conventions. -Rahul --- "Rajesh.Sachin10" <[EMAIL PROTECTED]> wrote: > > I tried to extract a boolean variable from a class > using context. The > following is my code in DSL file.

[rules-users] "Or" and Collect

2007-05-29 Thread Dirk Bergstrom
In my ongoing efforts to abuse Drools syntax, I would like to write rules like this: rule "severe bugs for which a member of your group is dev or support owner" when $group : UserGroup( ) $badBugs : List() from collect( Bug( (devOwner memberOf $group or supportOwner memberOf $group), severit

Re: [rules-users] rule compilation problems

2007-05-29 Thread Mark Proctor
You don't have all he necessary dependencies in your classpath. Mark Guillermo Arias del Rio wrote: Hi all, I am new to JBoss. I just finished making my first program with Rules and it works fine, but when I try to integrate all that into my web application (using Jetty), I get the following

Re: [rules-users] Sudoku Example Errors

2007-05-29 Thread Edson Tirelli
See my previous e-mail. Problem is fixed in trunk now. []s Edson 2007/5/25, webbo <[EMAIL PROTECTED]>: Hi Ming, I'm currently having a look at this - see my earlier post... as far as I can tell it might something to do with the setRemoveIdentities flag - but still cannot trace it through

Re: [rules-users] Sudoku Example Errors

2007-05-29 Thread webbo
Hi Ming, I'm currently having a look at this - see my earlier post... as far as I can tell it might something to do with the setRemoveIdentities flag - but still cannot trace it through - but will keep you posted on my progress. Steve Ming Fang wrote: > > Hi, > I'm getting many of these er

[rules-users] JBoss Rules as a Daemon Service

2007-05-29 Thread Arjun Dhar
Hi, I uploaded the JBoss Rules 4 WAR; I saw the repository options but no admin console to run a service. Maybe I'm missing something?!?! Q) Being under the cover of the JBoss server am sure there must be some fascility to run this as a daemon service 'out of the box'! Right?? <-- Important (p

[rules-users] Extracting an boolean variable

2007-05-29 Thread Rajesh.Sachin10
I tried to extract a boolean variable from a class using context. The following is my code in DSL file. context : Context(state == START_UP) Classname(aliasname : booleanVariableName) When I tried to run this statement I got the following error message in DRL file. Error Message: Unable to Crea

[rules-users] Agenda filter based on package name

2007-05-29 Thread Hooman Mozaffari
It seems "Rule" class doesn't store its parent "Package" information and Rule.getPackage() always returns null. I would like to create an AgendaFilter based on package name but there is no way to get the parent package of each rule. Thanks, Hooman public class PackageNameAgendaFilter imple

[rules-users] Removing Child Class Objects in dsl file level

2007-05-29 Thread Rajesh.Sachin10
My Code has the following Hierarchy. I am facing some problem, while I try to remove the Child level class object in .dsl file level. Class1: public class Class1{ private Class2 class2; //getter & setters for class2 } Class2: public class Class2{ Private Class3 class3; //getter & setters

[rules-users] Re: JBRMS

2007-05-29 Thread Arjun Dhar
Michael Neale gmail.com> writes: > > > Yes, as discussed, you need to add import statements for the types you want the BRMS to be aware of - if you like, create a feature request jira for auto importing. I deliberately didn't do it cause I thought it would cause more confusion, but perhaps I

Re: [rules-users] A Suggestion

2007-05-29 Thread Fernando Meyer
Thanks for your suggestion Jagaran, i'm going to correct this issue. Fernando Meyer [EMAIL PROTECTED] GPG: 5A6D 3374 B055 A513 9A02 A03B 3DB3 7485 D804 DDFB On May 29, 2007, at 1:20 AM, jagaran das wrote: Hi I n BRMS when you upload a Fact model it takes any input you give. I mean le

Re: [rules-users] Double

2007-05-29 Thread Mark Proctor
highDutyTotal is a new fact inside of your consequence, so when you call modify, it's actually working as an assert - you are not doing a modify there at all. Mark Matthew Shaw wrote: Hi there, seeing some very strange behaviour from the following rule * * *rule* "sum higher rate totals"

[rules-users] rule compilation problems

2007-05-29 Thread Guillermo Arias del Rio
Hi all, I am new to JBoss. I just finished making my first program with Rules and it works fine, but when I try to integrate all that into my web application (using Jetty), I get the following error: [java] java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.g