Re: [rules-users] Collect from

2009-08-18 Thread techy
Please someone help me on this. techy wrote: > > I would like to collect All Foo() for which there is no Bar() as given > below.Please help me on this. > Thanks. > > //psedo rule > rule 'test' > list : from collect( Foo(fooId: id) and not Bar(id !=

[rules-users] Collect from

2009-08-17 Thread techy
I would like to collect All Foo() for which there is no Bar() as given below.Please help me on this. Thanks. //psedo rule rule 'test' list : from collect( Foo(fooId: id) and not Bar(id !=fooId)) then //do conseq end -- View this message in context: http://www.nabble.com/Collect-from-tp25014904

Re: [rules-users] NullPointerException for Integer null

2009-05-02 Thread techy
You are right Edson. I also have another rule with less salience value that does < comparison. my attention was completely on first rule which does null check and thinking that was causing the issue :(. Good find and thanks again for the help. Edson Tirelli-3 wrote: > > Techy, &

[rules-users] NullPointerException for Integer null

2009-04-28 Thread techy
Hello, For following rule, NullPointerException is thrown for null id in 4.x. is this expected? Please clarify. Foo{ Integer id; } Rule "null check" foo : Foo(id==null) then end stack trace: java.lang.NullPointerException at org.drools.base.extractors.BaseObjectClassFieldExtractor.getIn

[rules-users] inconsistent behaviour with 'not' keyword

2009-04-28 Thread techy
Hello Simplified version of my rule is given below. Since I want to run this rule once once, I control it using Bar() fact. This rule fired inconsistently(i.e sometime it fired, sometime it is not). I could not also reproduce. Does anybody have the clue for this? Thanks for the help. rule "run o

Re: [rules-users] high cpu usage

2009-04-02 Thread techy
Thanks Arjun. "you may be using the same object in all your rules; so the theoretical ReteOO performance goes for a toss coz it does branch the tree based on object type." it is interesting to know this point. I didn't know that also affects performance. Yes. I use same object in most of the rules

[rules-users] help in writing this rule logic

2009-03-31 Thread techy
Hello, Please guide me to implement following rule. I would like to found out the city where absence of either Male or Female found for same age. I also need to have ref to those Men and Female of that city in collection to use it RHS. Also there will be max of one male & female for same age. Mal

Re: [rules-users] high cpu usage

2009-03-25 Thread techy
> Solaris does a real nice job of managing system resources. I've freaked > out > our operations guys by running systems at 100% more than once. ;-) I had > the boxes doing a lot of work, but not thrashing the CPU. > > Learn to use vmstat and monitor the run queue. Gene

Re: [rules-users] high cpu usage

2009-03-25 Thread techy
d "~60 rules" is to be >> expected >> as all the work is being done during fact insertion. Of course, adding >> more and >> more rules will, eventually, push the CPU load factor to the natural >> upper limit. >> >> If the overall throughput is g

Re: [rules-users] high cpu usage

2009-03-24 Thread techy
for batch of execution(i.e 1000 facts), I create stateless session in consumer and execute as given below. this.ruleBase.newStatelessSession().execute(facts); techy wrote: > > Hello > My app is functioning consumer/producer model. > 1.Producer reads the data from DB and inserts

[rules-users] high cpu usage

2009-03-24 Thread techy
Hello My app is functioning consumer/producer model. 1.Producer reads the data from DB and inserts to blocking queue 2.Consumer reads the data from queue and execute the rules using drools stateless session. Both producer and consumer run asynchronously. in my testing I found the following 1. f

[rules-users] ClassCast exception while doing retract

2009-03-17 Thread techy
Hello, My retract util func() is below and ClassCast exception is thrown. Some help please... public static void remove(WorkingMemory workingMemory,T... array) { if(array == null || array.length == 0) { return; } for (int i=0;ihttp://www.

[rules-users] Same global name in multiple drl

2009-03-14 Thread techy
Hello, If I have declared the same global var(ex:global Logger logger) in two drls and then add those into package builder & rulebase, how does drools handle them? will first declaration be overridden by first? Please clarify. -- View this message in context: http://www.nabble.com/Same-global

[rules-users] util drl function

2009-03-14 Thread techy
Hello, I would like to have all drools utility function in one drl file(static drl like static util class) and would like to refer to them all there drl without getting eclipse compilation error. Is it possible? Thanks for the help. -- View this message in context: http://www.nabble.com/util-d

[rules-users] "not matches'' not working when string is null

2009-03-02 Thread techy
Hello, I'm checking for condition ' field not matches ".*ABC.*" ` in my rule. when field value is null, rule does not fire. But if field value != null and != ABC, then rule fires. Is this expected output or bug? Please clarify. Thanks -- View this message in context: http://www.nabble.com/%22

Re: [rules-users] error when referening LHS->exists block var in RHS

2009-02-20 Thread techy
> then > //do conseq > end > > You can replace your timestamp (100) above with a Date variable or > something like it. > > []s > Edson > > 2009/2/17 techy > >> >> I think I better more accurate info for my requirement. >> &

Re: [rules-users] error when referening LHS->exists block var in RHS

2009-02-17 Thread techy
ker( price == 20.00 && timeInMillsec is close to 100 )) then //do conseq end Thanks. techy wrote: > > That's makes Edson. Thank you. > > Is there way to to sort the facts collected using "collect" in LHS itself? > I could not find any hint in the

Re: [rules-users] error when referening LHS->exists block var in RHS

2009-02-17 Thread techy
nt all of them, use "collect" instead of "exists". > >[]s >Edson > > 2009/2/17 techy > >> >> I get $foo can't be resolved error for following rule. Some guidance is >> appreciated to reference $foo without error. >> >&

Re: [rules-users] Inserting collection of facts in rule Consequence

2009-02-17 Thread techy
emory.*insert*(array[i]); >> } >> *return*; >> } >> >> ... >> >> *rule* "StarCoApplicants" *ruleflow-group* "STAR" >> *dialect* "mvel" >> *when* >> $creditContract : Cred

[rules-users] error when referening LHS->exists block var in RHS

2009-02-17 Thread techy
I get $foo can't be resolved error for following rule. Some guidance is appreciated to reference $foo without error. Rule "Foo rule" when exists( $foo: Foo()) then System.out.println($foo); end Thanks in advance. -- View this message in context: http://www.nabble.com/error-when-referening

Re: [rules-users] Inserting collection of facts in rule Consequence

2009-02-14 Thread techy
uleflow-group "STAR" > dialect "mvel" > when > $creditContract : CreditContract () > then > insertArray(drools.workingMemory,$creditContract.coApplicantArray); > end > > > Kent Symanzik > > > > > techy > Sent by: rules

Re: [rules-users] Inserting collection of facts in rule Consequence

2009-02-09 Thread techy
I would appreciate If someone can clarify this. Thanks in advance techy wrote: > > Hello, > > Is there way to insert all facts from collection (similar to > session.execute(collection)) in the rule consequence ? > > Thanks! > -- View this message in context

[rules-users] Inserting collection of facts in rule Consequence

2009-02-03 Thread techy
Hello, Is there way to insert all facts from collection (similar to session.execute(collection)) in the rule consequence ? Thanks! -- View this message in context: http://www.nabble.com/Inserting-collection-of-facts-in-rule-Consequence-tp21814308p21814308.html Sent from the drools - user mail

Re: [rules-users] Iterating two collection in LHS

2009-02-02 Thread techy
> rule "unlucky male" > where > $c : City() > $m : Male( $age : age ) from $c.maleList > not( Female( age ==$age ) from $c.femaleList ) > then > // $m is unlucky, no female with the same age > end > >[]s >Edson > > >

[rules-users] Iterating two collection in LHS

2009-02-02 Thread techy
Hello, Please help me to implement following rule in drool. I could not find a way to iterate two collection using accumulate or collect in LHS. public Male{ int age; //other fields } public Female{ int age; //other fields } public City{ private List maleList; private List femaleL

Re: [rules-users] How to Access and Execute Rules from Database

2009-01-23 Thread techy
NVAL > DEFAULT_NODE > DEFAULT_PROP > DEFAULT_REFS > > > REP_FSENTRY > REP_VERSION_FSENTRY > > > VERSION_BINVAL > VERSION_NODE > VERSION_PROP > VERSION_REFS > > > Please help. > > Regards, > Ashish > > On Fri, Jan 23, 2009 at 10:26 AM

Re: [rules-users] How to Access and Execute Rules from Database

2009-01-23 Thread techy
I do it this way...hope this may help.. List rules = dao.getAllRules();//reads RULE table and returns list of rule Object for (Rule rule : rules) { try { Clob ruleClob = rule.getRuleContent(); //I store complete rule info

Re: [rules-users] Collect CE requires a non-argument Exception..

2008-12-14 Thread techy
Please ignore. I found the problem. techy wrote: > > I'm getting following exception when tried to insert an object(which has a > Long field and three List reference) retrieved from dao in rule > conseqence. From stackTrace, I can see that it is thrown when drools is >

[rules-users] Collect CE requires a non-argument Exception..

2008-12-12 Thread techy
I'm getting following exception when tried to insert an object(which has a Long field and three List reference) retrieved from dao in rule conseqence. >From stackTrace, I can see that it is thrown when drools is trying to create an instance of List(which is not possible). Please someone clarify t

[rules-users] String 'like' comparison in mvel

2008-12-12 Thread techy
is there a way to do sql 'like' comparison in LHS without using eval+custom drool function? pseudo code: when Foo( name like "Mrs") Thanks -- View this message in context: http://www.nabble.com/String-%27like%27-comparison-in-mvel-tp20982921p20982921.html Sent from the drools - user mailing l

[rules-users] lhs "contains" check using global list

2008-12-09 Thread techy
I would like to do lhs ""contains"" check on global list for fact field as given below. but no luck so far.. some help please. global List globalIdList #psedo rule rule "check global lsit" when foo: Foo() list : List() from globalIdList list contains foo.getId() #also tr

Re: [rules-users] having counter in drl

2008-12-09 Thread techy
"+event.getEventId()); counter.setCount(counter.getCount()-1); update(counter); end dave sinclair wrote: > > Make counter an object > > when > $counter : Counter(value <= 100) > ... > > > On Mon, Dec 8, 2008 at 5:05 PM, techy <[EMAIL PROT

[rules-users] asserting more than one collection into stateless session

2008-12-09 Thread techy
Hi, Is there way to assert more than one collection into stateless session? StatelessSession has single colletion input function : execute(Collection collection) function. Please clarify. Thanks -- View this message in context: http://www.nabble.com/asserting-more-than-one-collection-into-sta

[rules-users] having counter in drl

2008-12-08 Thread techy
Hello, I would like to take 100 sampling facts for rule and persist it in the db and ignore other data. How Can I maintain the counter? as global variable? Please clarify with sample code. I tried following way and but it does not work as expected. Ex: global Integer counter; rule "get sampling d

Re: [rules-users] NullPointerException with float field

2008-12-02 Thread techy
Hello Mark, Is this a bug? techy wrote: > > I use 4.0.7. > > > Mark Proctor wrote: >> >> techy wrote: >>> I have rule that logical comparison with two Float fields(like price < >>> bidPrice || price >= bidPrice ). I get following exceptio

Re: [rules-users] DAO call in LHS

2008-11-28 Thread techy
of use > http://blog.athico.com/2007/06/chained-from-accumulate-collect.html > > > On Wed, Nov 26, 2008 at 9:08 PM, techy <[EMAIL PROTECTED]> wrote: > >> >> though I referred other thread about this topic, I'm not successful to >> make >> a >>

Re: [rules-users] NullPointerException with float field

2008-11-28 Thread techy
I use 4.0.7. Mark Proctor wrote: > > techy wrote: >> I have rule that logical comparison with two Float fields(like price < >> bidPrice || price >= bidPrice ). I get following exception if one of >> field >> is null. Is this expected behaviour? Please cla

[rules-users] NullPointerException with float field

2008-11-28 Thread techy
I have rule that logical comparison with two Float fields(like price < bidPrice || price >= bidPrice ). I get following exception if one of field is null. Is this expected behaviour? Please clarify. Thanks Caused by: java.lang.NullPointerException at org.drools.base.extractors.BaseObject

[rules-users] DAO call in LHS

2008-11-26 Thread techy
though I referred other thread about this topic, I'm not successful to make a dao call. I beg your pardon to ask again. 1. I want to pass the fact object to the dao function which returns boolean. I tried following rule and getting " Unexpected token '$fact'" as eclipse compilation error. Please

[rules-users] Pros n Cons of JANINO & ECLIPSE JDT

2008-11-21 Thread techy
Hello, 1.Is there any situation where one compiler can be preferred over other? 2. which compiler is ideal choice for production environment? Please clarify. Thanks -- View this message in context: http://www.nabble.com/Pros-n-Cons-of-JANINO---ECLIPSE-JDT-tp20630943p20630943.html Sent from the

Re: [rules-users] drools performance : max limit on # of facts for each execution

2008-11-18 Thread techy
I take back.. I noticed that it happened while I was doing memory profiling. for normal execution, it works fine.. Is there any limit on # of facts to be inserted into stateless session? or does it depend only on heap size? thanks. techy wrote: > > If I have set of rules(say 5 rules f

[rules-users] drools performance : max limit on # of facts for each execution

2008-11-18 Thread techy
If I have set of rules(say 5 rules for now.. which just compares few fields in facts and increments execution count on Rule Object as a consequence) working on single fact and I have huge amount of data to process, How many maximum facts can I insert into stateless session at a time for faster exe

[rules-users] is threadSafe required for external func call?

2008-11-11 Thread techy
Hello, >From the below example, Do I need to make function "incrementExecutionCount()" threadSafe here or does drools make threadSafe call to external functions? Please someone clarify. Thanks. global SampleDao dao; rule "1" when "some condition on fact" then Rule r = dao.getRule("1");

Re: [rules-users] no-loop & lock-on-active clarification

2008-11-11 Thread techy
e not contains "1 precondition", f1 != > null, f2 != null) > then > foo.addPreconditionPassedRule("1 precondition"); > update(foo) > end > > As for lock-on-active, it should be used in conjunction with a > ruleflow-group or agenda-group. It's

Re: [rules-users] no-loop & lock-on-active clarification

2008-11-11 Thread techy
didnt include rule "1 main condition" consequence before... updated rules & facts are given below techy wrote: > > > I tried following rules as given below and result are:(assumes facts > which I tried are qualified for both rules) > > 1. when lock-on-activ

[rules-users] no-loop & lock-on-active clarification

2008-11-11 Thread techy
I tried following rules as given below and result are:(assumes facts which I tried are qualified for both rules) 1. when lock-on-active used with both rule, only rule "1 precondition" got executed for all facts. 2. when no-loop used with both rules, infinite loop 3. when lock-on-active for rule

Re: [rules-users] inserting collection of facts

2008-11-08 Thread techy
ion of the rules with less salience by rules with higher salience in Sequential Mode. Actually I want to control rules execution this way. Is there any hack to achieve this now? Thanks again! Greg Barton wrote: > > > --- On Fri, 11/7/08, techy <[EMAIL PROTECTED]> wrote: > &g

Re: [rules-users] inserting collection of facts

2008-11-07 Thread techy
JVM GC take care of the clean up as long as I don't maintain any ref to those facts in my application? Greg Barton wrote: > > --- On Fri, 11/7/08, techy <[EMAIL PROTECTED]> wrote: > >> 1. I can't have multiple session from same rulebase and >> assign each ses

Re: [rules-users] Rule processing for High volume input

2008-11-07 Thread techy
hem. (i.e. mostly single object conditions, and less multi-object > conditions.) > > --- On Thu, 11/6/08, techy <[EMAIL PROTECTED]> wrote: > >> From: techy <[EMAIL PROTECTED]> >> Subject: [rules-users] Rule processing for High volume input >> To: rules-users@

[rules-users] inserting collection of facts

2008-11-06 Thread techy
Hello, searched the forum already for this question and didn't get clear answer. I would like to insert collection of facts into session(instead of looping over each fact inserting) and assert the rules on each fact as usual.please share your knowledge. -- View this message in context: http://

[rules-users] rule execution order

2008-11-06 Thread techy
If I have r1,r2,r3, execution flow has to be 1. fire r1 first 2.then fire r2 if r1 was fired 3.then fire r3 if r1 got executed & r2 was not fired then i can think of following way using salience and control flag. rule r1 salience 10 when r1 condition then fact.r1Executed = tr

[rules-users] Rule processing for High volume input

2008-11-06 Thread techy
I have to run rules(1000 rules) against 20-30 million of record each day. I guess I would have memory issue If I insert all of records into working memory. so I'm thinking to have multiple rule base instance and do batch processing as given below.so that I can avoid memory issue and quick rule pr

Re: Re: [rules-users] Independent rule evaluations

2008-11-06 Thread techy
Kris, Please clarify me. If anyone else has implemented db driven ruleflow, Please share your ideas. Thanks Kamesh Edson Tirelli-3 wrote: > >I guess you need to talk to Kris, the ruleflow master. :) > > 2008/11/6 techy <[EMAIL PROTECTED]> > >> >> T

Re: Re: [rules-users] Independent rule evaluations

2008-11-06 Thread techy
s > as > the rule base grows, because more rules you have, more you will benefit of > optimizations like node sharing and other techniques. > >If you go ahead, I suggest you contact Red Hat. They can help with your > solution design, training (if necessary) as well as provide

RE: [rules-users] Nested Rules

2008-11-05 Thread techy
Hello, I have similar doubt. Please clarify. I have r1,r2 in rfg1 and r3,r4 in rfg2. 1. execute rg2 after rg1. this can be in rule flow. no issue. 2.I want to execute r2 for facts where r1 is true. how can I do this without using semaphore fact or r1 conditions in r2 LHS in rule flow? 3.I want t

Re: Re: [rules-users] Independent rule evaluations

2008-11-04 Thread techy
Thanks Edson. Few more questions based on my requirements. I want to load all rules from the database once for everyday(during daily job startup) and apply them against huge amount of data.here rules are once loaded, no further need for dynamic addition/removal during that execution. But If I ad

Re: [rules-users] controling rule execution

2008-11-04 Thread techy
e I'm new to drools. It would be great If someone shed some light on this? 1. Can I achieve this work flow using rule flow? 2. What about sequential mode? Can I achieve using it? 3. Should I not be using drools or any rule engine at all for my requirement? Thanks techy wrote: > &g

Re: [rules-users] controling rule execution

2008-11-04 Thread techy
than the custom agenda filter approach, but: >> >> 1) I haven't tested the custom agenda filter thing, so I'm just guessing >> it'd work. (I'm pretty sure it would, though.) >> 2) It would be more portable across other rule engines. (If that's >>

[rules-users] can we mix java n mvel dialect in LHS

2008-11-04 Thread techy
Hello, I have some drools beginner questions 1.what is default dialect if it is not specified? 2. can We mix java and mvel syntax in LHS? Ex: class Cheese(String type,Set ingredients) Is this valid LHS? when cheese : Cheese(ingredients.getIngredients().size > 3,type == "American") 3. In my samp

[rules-users] loading rules dynamically

2008-10-31 Thread techy
Hi, If the rules,conditions,consequences have to be loaded from the database. I can think of following two approach. what would be right approach( I will have upto 1200 rules in the db) 1. Programmatically inject the rules into rule engine using drools API. 2. Read the rules from the database a

Re: [rules-users] controling rule execution

2008-10-31 Thread techy
, won't it affect other parent rule node? Greg Barton wrote: > > You may consider the other suggestion of retracting the fact(s) that would > trigger the child rule. It's the more "natural" way of going about it. > > What's driving this design choice?

Re: [rules-users] controling rule execution

2008-10-31 Thread techy
s initially prevented from firing, can it be > reactivated? If so, when and under what conditions? > > --- On Thu, 10/30/08, techy <[EMAIL PROTECTED]> wrote: > >> From: techy <[EMAIL PROTECTED]> >> Subject: [rules-users] controling rule execution >> To: rules-

[rules-users] controling rule execution

2008-10-30 Thread techy
Hello, I would like to have the rules parent/child structure. I don't want the child rules to be executed when parent's conditions are true(i.e consequence is executed) even if child's conditions are true. How Can I achieve that in drools? Please clarify. -- View this message in context: htt