[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

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

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]

[rules-users] Help me

2007-10-03 Thread prateek.katiyar
Hi I hava a rule file as: ?xml version=1.0 encoding=UTF-8? package name=rules xmlns=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 import name=com.wipro.rfq.report.bean.Validator.RFQBean /

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 comment

[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 defining

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

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:

[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()

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 )

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

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 ...

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-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

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 reference

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 = (

[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:

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 =

[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 really

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]:

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

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 on

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

[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

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

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

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

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 find

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

[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

[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

[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-time

[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

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

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:

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

[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,

[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

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

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

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: Hi,

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 project in

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 write web app using