Re: [rules-users] Writing rules using java from template

2008-10-07 Thread Mark Proctor
drools newbie wrote: Thanks Mark. I looked the unit tests. I'm looking for something different I would have different rules that compares varying fields(rather fixed set of fields) and those are all defined in the database. Ex: 1.Rule1 conditions are f1='a' & f2='b' in db 2. Rule2 conditions are

Re: [rules-users] Writing rules using java from template

2008-10-07 Thread drools newbie
Thanks Mark. I looked the unit tests. I'm looking for something different I would have different rules that compares varying fields(rather fixed set of fields) and those are all defined in the database. Ex: 1.Rule1 conditions are f1='a' & f2='b' in db 2. Rule2 conditions are f3='c' or f4='d' in db

[rules-users] import/upload package

2008-10-07 Thread hongyu lu
Hi, in drl, is there a way to specify whether a rule should go into business rule asset or tech rule asset after import? and what about category info(doesn't look like you can specify that part of info in drl)? thanks Jeff ___ rules-users ma

Re: [rules-users] Writing rules using java from template

2008-10-07 Thread Mark Proctor
drools newbie wrote: Hello, Actually I want to do the same way Sandeep has described. 1. Can someone please post some example to generate the drl from template? Drools 5.0, which you can see in the M2 release, has drools-templates. You'll need to look at the unit tests on how it works, but it

Re: [rules-users] Backward Chaining Support

2008-10-07 Thread Mark Proctor
Sangrish wrote: Hi this question has been asked previously but it has been answered as "the next major release will have backward chaining". Drools Wiki doesn't mention backward chaining. So, does all of it mean that Drools doesn't have backward chaining as of now? It doesn't have it yet,

Re: [rules-users] Writing rules using java from template

2008-10-07 Thread drools newbie
Hello, Actually I want to do the same way Sandeep has described. 1. Can someone please post some example to generate the drl from template? 2.This thread is more than a 1 1/2 year old. Does drools have in-built template concept now instead of using a template langauge such velocity, freemarker o

Re: [rules-users] different behavior in Eclipse vs. command line

2008-10-07 Thread Charles Binford
Solved. See my follow up to "trouble dynamically changing packages of a rulebase". cb Charles Binford wrote: This is related to yesterday's post titled "trouble dynamically changing packages of a rulebase". I decided to try and reduce the problem down as much as possible so I started with "

Re: [rules-users] trouble dynamically changing packages of a rulebase

2008-10-07 Thread Charles Binford
I believe I found my issue. It is related to this bug which was fixed in 4.0.5. http://jira.jboss.com/jira/browse/JBRULES-1329 Under eclipse I was running drools 4.07, but when running via cli I was inadvertently using version 4.0.4 jar files. cb Charles Binford wrote: I'm using 4.07. So

[rules-users] Backward Chaining Support

2008-10-07 Thread Sangrish
Hi this question has been asked previously but it has been answered as "the next major release will have backward chaining". Drools Wiki doesn't mention backward chaining. So, does all of it mean that Drools doesn't have backward chaining as of now? Thanks Siddharth -- View this message in

Re: [rules-users] JSR94 and compiled packages

2008-10-07 Thread Steve Nunez
Hi Kris, JSR-94 is not much of a standard, since it lacks any specification for rule definition and a BOM (Business Object Model). The best hope on the horizon for the ability to swap rule engines is the Rule Interchange Format that the W3C is working on. We recently completed a Blaze rep

[rules-users] listen to package polling event

2008-10-07 Thread hongyu lu
Hi, is there a way to listen to the package polling event? there are some operations need to happen in our app each time the rule package is refreshed from the server. thanks Jeff ___ rules-users mailing list rules-users@lists.jboss.org https

Re: [rules-users] insertLogical and modifyRetract (drools-solver)

2008-10-07 Thread tim tim
ups, i created a nice endless loop with my proposed solution. :-) the correct (still ugly) solution is: rule "fact1 should be smaller then 1" when $f : UserFact($fact1 : fact1 >= 1) not IntConstraintOccurence( ruleId == "fact1 should be smaller

[rules-users] different behavior in Eclipse vs. command line

2008-10-07 Thread Charles Binford
This is related to yesterday's post titled "trouble dynamically changing packages of a rulebase". I decided to try and reduce the problem down as much as possible so I started with "Hello World" program automatically created with Eclipse when you create a new Drools Project. I modified the p

Re: RV: [rules-users] Checking an xml field

2008-10-07 Thread Scott Reed
Yes, my suggestion would need to use the access methods (e.g. getGEO()) but I don't know what their names are. Otaduy del Paso, Zaloa [10/7/2008 12:38 PM] wrote: Hi, I have tried OASISTSO10($e: EVENT) EVENT($g: $e.GEO[0]) OASISTSO10($e.GE

Re: [rules-users] insertLogical and modifyRetract (drools-solver)

2008-10-07 Thread tim tim
thanks, you are right, that is kind of a solution. but not really what i am looking for. i am using drools-solver, and the "CreatedFact" is an IntConstraintOccurrence, which i do not want to change. maybe i should make the example more specific for my problem. i have a rule, used for the solver:

RE: RV: [rules-users] Checking an xml field

2008-10-07 Thread Greg Barton
Then use !GEO.isEmpty() as a condition. --- On Tue, 10/7/08, Otaduy del Paso, Zaloa <[EMAIL PROTECTED]> wrote: > From: Otaduy del Paso, Zaloa <[EMAIL PROTECTED]> > Subject: RE: RV: [rules-users] Checking an xml field > To: "Rules Users List" > Date: Tuesday, October 7, 2008, 10:51 AM > Scott, >

RE: RV: [rules-users] Checking an xml field

2008-10-07 Thread Otaduy del Paso, Zaloa
Hi, I have tried OASISTSO10($e: EVENT) EVENT($g: $e.GEO[0]) OASISTSO10($e.GEO[0].POSITION.LOCID matches "40.*") It makes sense to me, since OASISTSO10($e: EVENT) OASISTSO10($e.GEO[0].POSITION.LOCID matches "40.

RE: RV: [rules-users] Checking an xml field

2008-10-07 Thread Vikrant Yagnick
Hi Zaola, I may not be right, but I can think of one solution : when OASISTSO10($e: EVENT) EVENT($g: GEO) OASISTSO10(eval($e.GEO.size >0), ) Then Assert something When $e.GEO[0].POSITION.LOCID matches "40.*") Then

[rules-users] JSR94 and compiled packages

2008-10-07 Thread Keller, Kristopher
I know that the JSR94 interface can consume a DRL file but can it start with a precompiled package from BRMS or output of ant compilation? Can we only consume compiled packages with the native drools API (RuleAgent)? My company is exploring replacing Blaze Advisor with the JBOSS Rules engine.

RE: RV: [rules-users] Checking an xml field

2008-10-07 Thread Knapp, Barry
Might be worth trying OASISTSO10($e: EVENT) EVENT($g: $e.GEO[0]) OASISTSO10($e.GEO[0].POSITION.LOCID matches "40.*") Barry From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Otaduy del Paso, Zaloa Sent: Tuesday, October 0

RE: [rules-users] insertLogical and modifyRetract

2008-10-07 Thread Gras, Patrick
Hello, If you can change the code for CreatedFact and let it have a reference to UserFact and change the rule to: rule "fact = 1" when $f : UserFact(fact1 == 1); then insertLogical(new CreatedFact($f)); end you will also have to overide equals and hashcode

Re: RV: [rules-users] Checking an xml field

2008-10-07 Thread Scott Reed
Zaloa, You haven't answered my question as what the problem is. Do these rules compile? It seems to me that you have misunderstood how the condition part of the rules work. I agree with David that it would help for you to study the manual some more and to work through some of the tutorials. Sin

RE: RV: [rules-users] Checking an xml field

2008-10-07 Thread Otaduy del Paso, Zaloa
Hi David, Thanks for your helpful response. The problem was that the element GEO can appear 0 or many times so what I needed to write was this when OASISTSO10($e: EVENT) OASISTSO10($e.GEO[0].POSITION.LOCID == "40005") Then

[rules-users] insertLogical and modifyRetract

2008-10-07 Thread tim tim
Hello, I am a bit confused about how insertLogical() supposed to work in drools 5. when i have a rule such as: rule "fact = 1" when $f : UserFact(fact1 == 1); then insertLogical(new CreatedFact($f.getFact2())); end now i change $f in such a way, that the rule will fire

Re: RV: [rules-users] Checking an xml field

2008-10-07 Thread David Sinclair
Read the manual man. Your rules don't make any sense http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/ On Tue, Oct 7, 2008 at 9:49 AM, Scott Reed <[EMAIL PROTECTED]> wrote: > What is the problem you are seeing? Do the rules compile ok? > > Otaduy del Paso, Zaloa [10/6/2008 12:

Re: RV: [rules-users] Checking an xml field

2008-10-07 Thread Scott Reed
What is the problem you are seeing? Do the rules compile ok? Otaduy del Paso, Zaloa [10/6/2008 12:08 PM] wrote: Does anybody know the answer to my question? I'm not able to solve this issue and don't find any clarifying tutorial either Hi, I'm new in drools and I'm having some pr

Re: [rules-users] Parallell rules execution?

2008-10-07 Thread Edson Tirelli
Foundations are there. Look at the javadoc for: RuleBaseConfiguration.setMultithreadEvaluation() RuleBaseConfiguration.setMaxThreads() Consider it an early access version though, since I still want to add more tests and make sure everything is round and ready to go into final. []s

Re: [rules-users] possible bug with event declarations

2008-10-07 Thread Edson Tirelli
It is definitively a bug then. Will take a look. Edson 2008/10/7 Michal Bali <[EMAIL PROTECTED]> > Hi Edson, > Thanks for the quick reply. > > In the example I've mentioned there is already such import: > import org.drools.StockTick; > > BTW, it is a unit test you've written :) > > I've al

Re: [rules-users] possible bug with event declarations

2008-10-07 Thread Michal Bali
Hi Edson, Thanks for the quick reply. In the example I've mentioned there is already such import: import org.drools.StockTick; BTW, it is a unit test you've written :) I've also tried the fully qualified class name but it throws following exception (this was tested with 5.0.0M2): java.lang.NullP

[rules-users] Parallell rules execution?

2008-10-07 Thread Magnus Heino
I remember reading something somewhere a while ago about Drools 5 and parallel rules execution...? Is there any info available on this? Is it available in 5M2? When will it be available? What are the features? Are the any docs now? etc... Thanks! /Magnus Heino __