Re: [rules-users] suggestion for drl grammar: single-element constraints

2007-10-03 Thread Mark Proctor
I've been thinking about this too, although I idea I had was for a default field. List( > 5 ) from collect( Bus( color == "red" ) ) So we could define default fields that can be used in the way you said. Open a jira and we'll consider this for the next major release. Mark Godmar Back wrote:

Re: [rules-users] RE: RE: Regarding Package .Pkg

2007-10-03 Thread Drool_Beginner
Dear Mark, Thanks for you suggestion, Can you please guide me where I can find details about building AST. If posible please try to share some tutorial code Example also so that I can start getting it. Thamks. Abhi.. Mark Proctor wrote: > >> > You cannot change a rule once its created, but

Re: [rules-users] Drools web project in eclipse - Drools Library issue

2007-10-03 Thread Malika
I added jars to J2ee module dependencies and it worked fine. Thanks a lot! Regards, Malika Steven Williams-5 wrote: > > Make sure the drools jars end up in your WEB-INF/lib directory. > > cheers > Steve > > On 10/4/07, Malika <[EMAIL PROTECTED]> wrote: >> >> >> Hello, >> >> I started to wri

Re: [rules-users] Drools web project in eclipse - Drools Library issue

2007-10-03 Thread Fernando Meyer
Hi, You can check the drools insurance example http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-examples/drools-insurance/ Regards On 10/3/07, Malika <[EMAIL PROTECTED]> wrote: > > > Hello, > > I started to write web app using drools decision table. Here is what I > have > in my web pr

Re: [rules-users] Drools web project in eclipse - Drools Library issue

2007-10-03 Thread Steven Williams
Make sure the drools jars end up in your WEB-INF/lib directory. cheers Steve On 10/4/07, Malika <[EMAIL PROTECTED]> wrote: > > > Hello, > > I started to write web app using drools decision table. Here is what I > have > in my web project in eclipse 3.3, > drools 4.0: > > 1. A Jsp page that takes

Re: [rules-users] custom defined types in setter and getters

2007-10-03 Thread Steven Williams
No - you can use any java object as a fact, so both of your classes are fine. For instance you could do: when Car($p: paint) then System.out.println($p.getName()); end and using MVEL you could do: when Car(paint.name == "red") then ... On 10/4/07, jack wu <[EMAIL PROTECTED]> wrote: > >

Re: [rules-users] rules precompilation

2007-10-03 Thread Scott Reed
You didn't even bother to read the thread you interrupted here, did you Sergey? Manukyan, Sergey's message received 10/3/2007 1:29 PM: Folks, Where can I find information on how to pre-compile rules in 4.0.1? Thanks, -Sergey ___ rules-users mailing

Re: [rules-users] How to have your emails ignored

2007-10-03 Thread Scott Reed
Mark Proctor's message received 10/3/2007 12:28 PM: Scott Reed wrote: Please tell me how I can call a function on the LHS. (hurry my assignment is due today!) Is that not covered by #2, it's more of an example for #2? Actually I thought I was being funny about #11 and threw in the bit about get

[rules-users] Drools web project in eclipse - Drools Library issue

2007-10-03 Thread Malika
Hello, I started to write web app using drools decision table. Here is what I have in my web project in eclipse 3.3, drools 4.0: 1. A Jsp page that takes input and pass it on to a servlet that fires the rules. 2. Servlet class has import statements: import org.drools.RuleBase; import org.drools.

[rules-users] RE: rules precompilation

2007-10-03 Thread ekke
sergey, just tried it: exported a package with rules as stream (using the writeExternal() from Package) then in another run I created new RuleBase, added new Package, then import the rules into this empty Package (using the readExternal() from Package) then added some facts, execute the rules,

Re: [rules-users] MVEL VariableResolverFactory problem on eclipse

2007-10-03 Thread ekke
felipe, please DON'T send your messages to the list AND to private mail-accounts ! .have you started eclipse with -clean ? ekke Felipe Piccolini wrote: > > updated to 4.0.1 and creating a new drools project. Any .drl file > (and also rule flows) shows errors with this info on problems

RE: [rules-users] rules precompilation

2007-10-03 Thread Manukyan, Sergey
Did it immediately... If you don't mind could you post code that works? Thanks. -Sergey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jin, Ming Sent: Wednesday, October 03, 2007 3:40 PM To: Rules Users List Subject: RE: [rules-users] rules precompila

RE: [rules-users] rules precompilation

2007-10-03 Thread Jin, Ming
Did you save the Package right after the creation from PackageBuilder, or after some other processes? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Manukyan, Sergey Sent: Wednesday, October 03, 2007 2:21 PM To: Rules Users List Subject: RE: [rules-user

RE: [rules-users] rules precompilation

2007-10-03 Thread Manukyan, Sergey
Ming, Ekke, After deserialising the Package back - getting exception when inserting facts: Exception thrown : java.lang.NoClassDefFoundError: XXXShadowProxy XXX - is my class name Any ideas? -Sergey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ji

[rules-users] BRMS - how to use variables on Action part?

2007-10-03 Thread Felipe Piccolini
Ok, so to fit on the "not ignored emails" from the list Mark posted, I changed the title. However I following in the list anyways beacuse Im resending this email in less than 3 days. Note: Im not desperate, nor this is for today. This just came out today yesterday and well... its important to

[rules-users] suggestion for drl grammar: single-element constraints

2007-10-03 Thread Godmar Back
If a fact contains a single field, it would be nice to be able to express a constraint on the value of that field without having to know its name, e.g.: Cheese ("stilton") which would be equivalent to Cheese (type == "stilton") if Cheese contained only one field, and which would be a compile-ti

[rules-users] MVEL VariableResolverFactory problem on eclipse

2007-10-03 Thread Felipe Piccolini
updated to 4.0.1 and creating a new drools project. Any .drl file (and also rule flows) shows errors with this info on problems tab on eclipse: org/mvel/integration/VariableResolverFactory no more info, actualy I can run the rules (from the Sample.drl) but it shows the problem. I tried chan

[rules-users] Rule Compilation error

2007-10-03 Thread Michael Epstein
Hi, I have a JBRMS question. I have DSL that I am using, when I build a rule in the guided editor that uses the DSL it works fine. When I use the business rule text edit, the same [when] fails validation. Here is the error: Rule Compilation error Expression "smcUnit" is not an rvalue Unk

RE: [rules-users] rules precompilation

2007-10-03 Thread Jin, Ming
Sergey, I am using precompiled rules. Serializing instances of org.drools.rule.Package works for me. Thanks, -Ming -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Manukyan, Sergey Sent: Wednesday, October 03, 2007 12:29 PM To: Rules Users List Subject:

[rules-users] custom defined types in setter and getters

2007-10-03 Thread jack wu
Hi, i suppose the second form of fact is not supported. but i'd like to confirm. in other words, you can only have setters and getters that return basic java types. is that right? can i return java collections such as array and map? the documentation is not clear on that. thanks. public clas

Re: [rules-users] rules precompilation

2007-10-03 Thread ekke
sergey, one possible way: after adding your rules to a package, you can use yourPackage.writeExternal() to store your package (with compiled rules) anywhere. later you can get the compiled rules back with ...Package.readExternal() ekke Manukyan, Sergey wrote: > > > Folks, > > Where can I fin

[rules-users] rules precompilation

2007-10-03 Thread Manukyan, Sergey
Folks, Where can I find information on how to pre-compile rules in 4.0.1? Thanks, -Sergey ** ** LEGAL DISCLAIMER ** ** This E-mail message and any attachments may contain legally privileged, confidential or proprietary information. If you are not the

[rules-users] BRMS Guided Editor w/ variable binding

2007-10-03 Thread Drouin.Mathieu
Ok, I've read the rules, seems like I was infringing on #11. I might be violating #3 by sending this one though :) https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/ trunk/target/docs/shared/images/Chapter-Examples/BRMS_Guided.png Is the guided editor with variable binding (

Re: [rules-users] How to have your emails ignored

2007-10-03 Thread Mark Proctor
ok I've blogged this already: http://blog.athico.com/2007/10/how-to-have-your-emails-ignored.html :) Scott Reed wrote: Please tell me how I can call a function on the LHS. (hurry my assignment is due today!) ekke's message received 10/3/2007 11:10 AM: don't open a new topic - place your mail i

Re: [rules-users] How to have your emails ignored

2007-10-03 Thread Mark Proctor
Scott Reed wrote: Please tell me how I can call a function on the LHS. (hurry my assignment is due today!) Is that not covered by #2, it's more of an example for #2? #1. Start the email with "URGENT" #2. Tell everyone how desparate you and how you need an immediate response for your really impo

Re: [rules-users] How to have your emails ignored

2007-10-03 Thread Mark Proctor
ok here is the list updated. In reality we aren't that formal, and the tone of the list below is tongue in cheek, but if I put this up on the mailing list info page hopefully it might help a little, especially as traffic picks up. There was 20K download attempts last month, so I think our littl

Re: [rules-users] JBRMS - Decision Tables - Effective Dates & Expiration Dates

2007-10-03 Thread Mark Proctor
Barry K wrote: What is the direction for handling date-effective and date-expiration when compiling decision tables? Currently, org.drools.decisiontable.model.Rule does not have attributes for effective or expiration date. I started going down the path of adding the attributes to org.drools.

Re: [rules-users] How to have your emails ignored

2007-10-03 Thread Scott Reed
Please tell me how I can call a function on the LHS. (hurry my assignment is due today!) ekke's message received 10/3/2007 11:10 AM: don't open a new topic - place your mail in the middle of another thread which belongs to a totally different topic start your email with "I'm a member of the droo

[rules-users] JBRMS - Decision Tables - Effective Dates & Expiration Dates

2007-10-03 Thread Barry K
What is the direction for handling date-effective and date-expiration when compiling decision tables? Currently, org.drools.decisiontable.model.Rule does not have attributes for effective or expiration date. I started going down the path of adding the attributes to org.drools.decisiontable.mod

Re: [rules-users] How to have your emails ignored

2007-10-03 Thread Mark Proctor
Sure I'll number each of the items below, so on the times those emails aren't totally ignored, someone can reference them to that item number. Manukyan, Sergey wrote: I would suggest create a manual on how to communicate on this mailing list, and all emails not conforming to this manual be tagge

Re: [rules-users] Retract in a function

2007-10-03 Thread Ronald R. DiFrango
Michael, In my case, I am modifying the object, so I thought a modifyRetract was the better option. As for the differences, I will defer to the Drools team. Please note that CC'ed the group again as you did not on my response. Ron On 10/3/07, Anstis, Michael (M.) <[EMAIL PROTECTED]> wrote: > >

Re: [rules-users] How to have your emails ignored

2007-10-03 Thread ekke
don't open a new topic - place your mail in the middle of another thread which belongs to a totally different topic start your email with "I'm a member of the drools mailinglist, so please answer me" ekke Mark Proctor wrote: > > Did this for some fun, will add it to the mailing lists info page

RE: [rules-users] How to have your emails ignored

2007-10-03 Thread Manukyan, Sergey
I would suggest create a manual on how to communicate on this mailing list, and all emails not conforming to this manual be tagged with f.e... LIST COMMUNICATION ABUSE REFRENCE # 2.1.1, please consider to reformat your email to match those standards. Therefore the sender knows what it is about and

RE: [rules-users] Drools 4.0 StateExampleWithDynamicRules Question

2007-10-03 Thread Daren Chylinski
Hello, I was pulled away from my Drools learning and now I am back. I must have missed the response to my previous inquiry. Is there anyone that has experienced the scenario described below? Regards, Daren From: [EMAIL PROTECTED] [mailto:[EMAIL PROTE

Re: [rules-users] Using java.util.List in rules

2007-10-03 Thread Edson Tirelli
Use the "from" CE: rule "This rule will fire once for each Caracteristica whose codCarac is != 0" when Especialista( $caracList : retratoUser.lstCarac ) Caracteristica( codCarac != 0 ) from $caracList then ... end []s Edson 2007/10/3, Bhattacharya, Sougata <[EMAIL PROTECTED]>

[rules-users] How to have your emails ignored

2007-10-03 Thread Mark Proctor
Did this for some fun, will add it to the mailing lists info page on the website. Anyone else have some more ideas? I'll blog the final results :) How to have your emails ignored: Start the email with "URGENT" Tell everyone how desparate you and how you need an immediate response for your reall

RE: [rules-users] Arrays help

2007-10-03 Thread Anstis, Michael (M.)
If you can't insert the NameValue objects at all because you are using somebody else's code to setup the initial facts you can use another rule to do this for you:- rule "insert NameValues" salience -100 when $l : LineItem( ) then for(int i = 0, NameValue[] nvs = $l.ge

[rules-users] URGENT: BRMS - how to use variables on Action part?

2007-10-03 Thread Felipe Piccolini
Anyone knows how to use variables (from fields) setted on LHS, to modify a field on the RHS using the GUI editor from BRMS? What I need is to write this rule on BRMS. rule "Set approvedMount for a women" no-loop true when $p: Person($sex: sex == "F", $income: in

Re: [rules-users] Retract in a function

2007-10-03 Thread Ronald R. DiFrango
I got it, the following works: function void openRTVLines(WorkingMemory workingMemory, QueryResults results, String status) { System.out.println( "We have " + results.size() + " Open RTV Lines" ); for ( Iterator it = results.iterator(); it.hasNext(); ) { QueryResult result = ( Quer

Re: [rules-users] update Fact on BRMS bad restriction. Please change.

2007-10-03 Thread Felipe Piccolini
Mark, Im sorry, I never try to say the work u did is useless. I think the work is great and I thank u guys for doing this. The problem I have is that I need to use the GUI the way the business guy write the logic and I cant find the easy way to do this. Maybe is my fault because I dont kn

Re: [rules-users] Retract in a function

2007-10-03 Thread Ronald R. DiFrango
I have now tried the following and it did not seem to have the intended result of removing the detail line from working memory: function void openRTVLines(WorkingMemory workingMemory, QueryResults results, String status) { System.out.println( "We have " + results.size() + " Open RTV Lines" );

Re: [rules-users] Retract in a function

2007-10-03 Thread Ronald R. DiFrango
Michael, Those detail lines are in working memory for sure. In fact the query it self only works on working memory objects. As far as I know you can not place the results of a queryResult in the LHS. Ron On 10/3/07, Anstis, Michael (M.) <[EMAIL PROTECTED]> wrote: > > Can you not get a referen

RE: [rules-users] Arrays help

2007-10-03 Thread Bhattacharya, Sougata
Your assumption is correct, but how do I iterate throw the array From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael (M.) Sent: Wednesday, October 03, 2007 6:52 PM To: Rules Users List Subject: RE: [rules-users] Arrays help Do yo

[rules-users] serialize RuleBase... precompiling rules

2007-10-03 Thread Manukyan, Sergey
Folks, Using 4.0.1. Can I serialize RuleBase object in order to load later precompiled rules? So far I was able to do that but when inserting facts into stateful session based on that rulebase exception is thrown: java.lang.NoClassDefFoundError: XXXShadowProxy What is the correct way of precom

RE: [rules-users] Arrays help

2007-10-03 Thread Anstis, Michael (M.)
Do you mean you cannot insert NameValue facts into working memory? If this is the case, then you might have to use eval or MVEL dialect. Based upon your model below I assumed you could insert NameValues:- LineItem-->getParameters() returns Parameter[] Parameter->getNameValueArray() return Name

RE: [rules-users] Retract in a function

2007-10-03 Thread Anstis, Michael \(M.\)
Can you not get a reference to a DetailLine in the LHS? If you have not inserted DetailLine objects into working memory how can you expect to retract them? If you have inserted DetailLine's into working memory what does query "Open RTV Lines" return, can it be joined into the LHS? (or split int

[rules-users] Retract in a function

2007-10-03 Thread Ronald R. DiFrango
All, I have the following function that I call from all of my rules. When I execute this function, I need to retract that object from working memory. The problem is that when I insert the comment line below I get a compiler error saying that I can only issue a retract on fact handles. Here is an

RE: [rules-users] Arrays help

2007-10-03 Thread Bhattacharya, Sougata
Yes that's the simple one, but I can't send the NameValue, I will send only the LineItem From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael (M.) Sent: Wednesday, October 03, 2007 5:36 PM To: Rules Users List Subject: RE: [rules-user

RE: [rules-users] Arrays help

2007-10-03 Thread Anstis, Michael (M.)
I forgot to mention, this assumes you want to maintain the relationships. If you're not interested in these but merely want to process all NameValue objects then a simple rule works fine:- rule "don't worry about preserving relationships" when $n : NameValue ( ) then ... e

Re: [rules-users] RE: RE: Regarding Package .Pkg

2007-10-03 Thread Mark Proctor
Drool_Beginner wrote: Yes, instead I don't want to write any DRL file. I want to create Rule directliy in PackageBuilder object , instantiate it and run the rule through it. If it is not possible then I want to create drl file once and later on I have to modify PackageBuilder from my Java

RE: [rules-users] Arrays help

2007-10-03 Thread Anstis, Michael (M.)
There are a number of ways... Java dialect [requires LineItem, Parameter and NameValue to be asserted into working memory] rule "a - requires object model change for parent property" when $l : LineItem( ) $p : Parameter ( parent == $l ) $n : NameValue( parent == $p )

[rules-users] Arrays help

2007-10-03 Thread Bhattacharya, Sougata
Hi All, I have a object graph like this LineItem has array of Parameter and each Parameter has array of NameValue and Namevalue object has name and value. Now I have LineItem object in working memory, how to test the value of each value of NameValue object. LineItem-->getParameters() retu

RE: [rules-users] RE: RE: Regarding Package .Pkg

2007-10-03 Thread Anstis, Michael \(M.\)
I recall reading other users building rules with the API. But it is not something I have any experience of. Sorry. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Drool_Beginner Sent: 03 October 2007 11:25 To: rules-users@lists.jboss.org Subject: [rules-

Re: [rules-users] Using java.util.List in rules

2007-10-03 Thread Anderson Pazza Mello
Thanks A lot =) Now I got it! 2007/10/3, Bhattacharya, Sougata <[EMAIL PROTECTED]>: > > If I want to test for all ith element, > > Like this > > > > rule "Test" > > when > e : Especialista(retratoUser.lstCarac.get(i).codCarac != 0) > then > System.out.println ("test"); > >

[rules-users] RE: RE: Regarding Package .Pkg

2007-10-03 Thread Drool_Beginner
Yes, instead I don't want to write any DRL file. I want to create Rule directliy in PackageBuilder object , instantiate it and run the rule through it. If it is not possible then I want to create drl file once and later on I have to modify PackageBuilder from my Java code or program code. i

RE: [rules-users] RE: Regarding Package .Pkg

2007-10-03 Thread Anstis, Michael \(M.\)
Do you mean, once you've loaded a DRL file into a Package object you want to modify rule definitions? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Drool_Beginner Sent: 03 October 2007 09:58 To: rules-users@lists.jboss.org Subject: [rules-users] RE: Rega

RE: [rules-users] Help me

2007-10-03 Thread Anstis, Michael \(M.\)
Taken from the documentation:- 1.6.5.2. Agenda Groups Agenda groups are a way to partition rules (activations, actually) on the agenda. At any one time, only one group has "focus" which means that the activations for rules in that group will only take effect - you can also have rules "auto focus

[rules-users] RE: Regarding Package .Pkg

2007-10-03 Thread Drool_Beginner
Thanks Anstis, for your clarification. Is there a way that I can directly manipulate directly this "PackageBuilder" from my JAVA code . Instead of updating drl file. Thanks & Regards, Abhi.. Anstis, Michael (M.) wrote: > > I think you might misunderstand. > > A DRL file contains text definin

Re: [rules-users] Package.clear() doesn't clear RuleFlows

2007-10-03 Thread ekke
Mark, ...just downloaded build832-rev15510-20071002-0845 but same as before: the RuleFlow is still there after clear() also after removeRuleFlow() started eclipse -clean, verified that there are only jars from the snapshot regards ekke Mark Proctor wrote: > > ekke wrote: >> there's no commen

[rules-users] Help me

2007-10-03 Thread prateek.katiyar
Hi I hava a rule file as: http://drools.org/drools-4.0"; xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"; xs:schemaLocation="http://drools.org/drools-4.0 drools-4.0.xsd"> (rfq.getM_rfqId() ==null) || (rfq.getM_rfqId().trim().equals("")) System.out.println("The

RE: [rules-users] Using java.util.List in rules

2007-10-03 Thread Bhattacharya, Sougata
If I want to test for all ith element, Like this rule "Test" when e : Especialista(retratoUser.lstCarac.get(i).codCarac != 0) then System.out.println ("test"); end what should I do From: [EMAIL PROTECTED] [mailto:

RE: [rules-users] Regarding Package .Pkg

2007-10-03 Thread Anstis, Michael \(M.\)
I think you might misunderstand. A DRL file contains text defining rules. Each DRL file is assigned a package name (much like Java). The DRL file is loaded, parsed (PackageBuilder) and converted into a Package instance. Packages are added to RuleBases from which WorkingMemory can be obtained fo

[rules-users] Regarding Package .Pkg

2007-10-03 Thread Drool_Beginner
Dear All, Where I can get more information about .pkg, Since I have got information that .drl file get converted in to pkg(Package), which is writing .drl information into Stream. Please send me some information as our requirement is some what to take benifit from .pkg. Thanks in Advance Regar