Re: [rules-users] Backward Chaining Tutorial

2013-07-11 Thread Stathis Rouvas
Oops! Sorry... -Stathis - Original Message - From: "Stathis Rouvas" To: "Rules Users List" Sent: Thursday, July 11, 2013 6:48:04 PM Subject: Re: [rules-users] Backward Chaining Tutorial - Original Message - From: "Mark Proctor" To: "

Re: [rules-users] Backward Chaining Tutorial

2013-07-11 Thread Stathis Rouvas
- Original Message - From: "Mark Proctor" To: "Rules Dev List" , "Rules Users List" Sent: Friday, May 24, 2013 9:55:30 AM Subject: [rules-users] Backward Chaining Tutorial made this video, hope it helps in understanding backward chaining. https://www.youtube.com/watch?v=fCjIRVSRFvA M

Re: [rules-users] [5.4.0] Combining custom operators with OR results in compile error

2012-05-23 Thread Stathis Rouvas
m-introduction-docs/html/gettingstarted.html > > Mark > On 18/05/2012 16:03, Stathis Rouvas wrote: >> Hello List, >> >> I recently migrated from Drools.5.0.1 to Drools.5.4.0 and I am having >> issues when combining constraints with OR when custom operators are >> involve

Re: [rules-users] [5.4.0] Combining custom operators with OR results in compile error

2012-05-21 Thread rouvas
m-introduction-docs/html/gettingstarted.html > > Mark > On 18/05/2012 16:03, Stathis Rouvas wrote: >> Hello List, >> >> I recently migrated from Drools.5.0.1 to Drools.5.4.0 and I am having >> issues when combining constraints with OR when custom operators are >> involve

[rules-users] [5.4.0] Combining custom operators with OR results in compile error

2012-05-18 Thread Stathis Rouvas
Hello List, I recently migrated from Drools.5.0.1 to Drools.5.4.0 and I am having issues when combining constraints with OR when custom operators are involved. For example, the following rule: rule "r548695.1" no-loop true dialect "mvel" when gnId : GN() la : t547147( ) v1717 : T

Re: [rules-users] [Drools.5.0.1] insertLogical abnormalities

2012-04-24 Thread rouvas
ools version is not feasible at the moment, although at the TODO list. Thank you for your time, -Stathis > > Mark > > On 24/04/2012 18:43, Stathis Rouvas wrote: >> Hi List. >> >> I am using Drools.5.0.1. >> >> I am experiencing abnormalities using i

[rules-users] [Drools.5.0.1] insertLogical abnormalities

2012-04-24 Thread Stathis Rouvas
Hi List. I am using Drools.5.0.1. I am experiencing abnormalities using insertLogical(), namely that in the following code RaResultCode and RegistryUsed are found inserted (using the relevant queries), while InternalResultCode is not found (using the query "get ircQuery") and I cannot exp

Re: [rules-users] drools arithmetics without eval()

2012-03-14 Thread rouvas
Wolfgang Laun wrote: > accumulate is not the way to go. > > If you need accumlated counts for certain facts, by type or, within > some type, by attribute value, then you should set up secondary facts > and maintain these during the element insertion process or by separate > (static) rules. > > clas

Re: [rules-users] Declarative fact model or Java?

2012-01-20 Thread rouvas
Apart from these considerations, you may also need to take into account performance and memory differences between the two approaches. In my Drools.5.0.1 project, I was tempted by declarative facts at first, until I found out that at runtime you need approximately 3 times the memory and you incur

Re: [rules-users] Can Drools supply large Knowledge Base?

2011-12-12 Thread rouvas
WangRamon wrote: > > Hi Stathis You're probably right, maybe it's a wrong question, i'm new to > Drools, so I copy the rule sample from user guide as below to better > explain, that's what i need, but the rule will be automatically generated > in the future.. package com.company.license > > rule "I

Re: [rules-users] Can Drools supply large Knowledge Base?

2011-12-12 Thread rouvas
WangRamon wrote: > > Hi Guys I'm still confused about this question, let's say i may have a > very large rule set, how can Drools support this case, will it load every > rule into memory? Any idea? Thank you guys. CheersRamon You are either asking the wrong question or you do not understand what y

Re: [rules-users] Inserting Facts from Json Format

2011-12-09 Thread rouvas
ihabo01 wrote: > Many thanks Vincent, > > But this is actually the problem, my object is not a JAVA object. It is > only > defined in the rule, so only the rule knows about it. Get a FactHandle to the Fact and iterate over the list of properties matching their names to those of the JSON propertie

Re: [rules-users] Drools all lhs execute before all the rhs, i want to run sequentially

2011-09-26 Thread rouvas
Saurabh Pandey wrote: > @Nguy I tried salience but it just orders the execution of "when" part, > but > still all when execute before the "then" parts Hi, it seems to me that you are using the wrong tool to solve your problem. Drools is a rule-based execution engine (among other things) not a glo

Re: [rules-users] Trapping runaway rules

2011-08-31 Thread rouvas
Swindells, Thomas wrote: > I've found no-loop to be pretty much completely useless. > It only stops the rule from triggering itself, but it doesn't stop loops > where multiple rules Correct. I suggested "no-loop" exactly from preventing the same rule to fire in a loop. Another road to follow, cou

Re: [rules-users] Trapping runaway rules

2011-08-30 Thread rouvas
I would also suggest that you add a "no-loop" directive to each one of your rules, at least to the ones "written" by the end-users (if I understood correctly). As I have (painfully) found, it is extremely easy to produce never-ending loops on (end)user-created rules. -Stathis Dean Whisnant wrote

Re: [rules-users] jaxb generated fact loaded into Guvnor throws errors when using the ' is contained in the comma separated list' operator

2011-07-14 Thread rouvas
sreeram.vadlam...@wellsfargo.com wrote: > Hello , > > I am using 5.2.0.CR1 version of Guvnor . > > I have a jaxb generated class loaded through the model jar into Guvnor to > be used as a fact in the Guided Decision Table editor. > > When I use a field ACTIVITYCODE of type String from the JAXB gen

Re: [rules-users] Date arithmetic in when part

2011-06-30 Thread rouvas
Wolfgang Laun wrote: > 2011/6/30 > >> What are the available symbolics for temporal values? >> That is, d is for days, m is for minutes, h is for hours, s is for >> seconds. >> Are there any other symbolics specifically for months and years? >> Thanks for the clarification. > > You can use ms fo

Re: [rules-users] Date arithmetic in when part

2011-06-30 Thread rouvas
What are the available symbolics for temporal values? That is, d is for days, m is for minutes, h is for hours, s is for seconds. Are there any other symbolics specifically for months and years? I haven't found any mentioning of them in the Fusion manual. I'm using 5.0.1 Thank you, -Stathis Wolf

Re: [rules-users] Date arithmetic in when part

2011-06-28 Thread rouvas
Thanks for the quick reply. I forgot to mention that I'm using 5.0.1, but I'll look at the Fusion manual for more info. -Stathis Wolfgang Laun wrote: > See the "Fusion" manual, section on Temporal Reasoning/Temporal Operators. > Even when the facts aren't events, these operators can still be appl

[rules-users] Date arithmetic in when part

2011-06-28 Thread rouvas
Hi list, I feel this should be an elementary question but unfortunately I haven't been able to find a solution. I would like to perform date arithmetic in the when part of a rule. For example, I would like to express something like: rule "Date compare rule" dialect "mvel" when a : A() b :

Re: [rules-users] How to use for loop in drools!!!!

2011-04-19 Thread rouvas
Sumeet Karawal wrote: > Thanks Esteban!!. I got you point. But how to make the rule to run > according to a condition, in a loop. > > Also, how can we trigger the firing of one rule from another rule. Like > when the Condition part of a rule satisfies then, in the Action part a > particular rule is

Re: [rules-users] JDK1.5 Future for Drools and jBPM

2011-01-21 Thread rouvas
Wolfgang Laun wrote: > All who stick with JDK 1.5 should realize that >- JDK 1.5 has officially reached "end-of-life", i.e., no more > maintenance Valid point, but you can't move JDKs if it is not supported by the application server. Main platform over here is Oracle.10g, i.e. JDK5. -Stathis

Re: [rules-users] JDK1.5 Future for Drools and jBPM

2011-01-20 Thread rouvas
Will be using JDK5 for the forseable future. -Stathis Mark Proctor wrote: > http://blog.athico.com/2011/01/jdk15-future-for-drools-and-jbpm.html > > Dropping JDK1.5 is something that rears it's head from time to time, and > we know we have to address it sooner or later. > > We recognise that the

Re: [rules-users] [SOLVED] Too many ACTIVATION "candidates"

2010-12-29 Thread rouvas
Greg, thank you for your advise. That helped me tackle the problem. -Stathis Greg Barton wrote: > One way of detecting cartesian products is to model the LHS as a graph, > with object patterns being nodes, and conditions that compare two objects > being an edge. If the LHS graph has unconnected

Re: [rules-users] Too many ACTIVATION "candidates"

2010-12-24 Thread rouvas
Thanks a lot Greg. This is definitevely something I must look into. -Stathis Greg Barton wrote: > One way of detecting cartesian products is to model the LHS as a graph, > with object patterns being nodes, and conditions that compare two objects > being an edge. If the LHS graph has unconnected

Re: [rules-users] Too many ACTIVATION "candidates"

2010-12-23 Thread rouvas
Swindells, Thomas wrote: > Your problem is you have a series of 5 facts which have no dependent > constraints between them, the constraint is only applied by the last fact > and even that isn't constraining as it involves ors not ands (if there is > a fact 5 that matches then every combination of v

Re: [rules-users] Too many ACTIVATION "candidates"

2010-12-22 Thread rouvas
Wolfgang Laun wrote: > Are the constraints c9 == "R" true for all Facts of type > fact1,...fact5? > Is this actually the only constraint? For the example rule I have posted, this is the only constraint. The equality test for "R", in that case does not really prune the facts a lot. The numbers

[rules-users] Too many ACTIVATION "candidates"

2010-12-22 Thread rouvas
Hello List, Issue: Too many ACTIVATION "candidates" Sorry for the terminology, I'm sure it is not correct. Background Information: - Drools.5.0.1 - using StatefulKnowledgeSession - logging through KnowledgeRuntimeLoggerFactory.newConsoleLogger() - after each session creation, rules are inserted

Re: [rules-users] Urgent..Dynamic nature of rules

2010-11-23 Thread rouvas
Hi, Assuming you can have your rules in a byte[], you can use something along the lines of: bytes[] KB = ... your rules ... KnowledgeBuilderConfiguration builderConf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowle

Re: [rules-users] accumulate vs collect

2010-11-12 Thread rouvas
Edson Tirelli wrote: > I believe this is fixed in Drools 5.1.1, as in 5.0.1 declared > beans where not implementing the Serializable interface. Please try > 5.1.1 and let us know if you still see the problem. Unfortunately I am the final stages of my project and cannot afford to switch Drools

Re: [rules-users] accumulate vs collect

2010-11-12 Thread rouvas
Wolfgang Laun wrote: > The suggested workaround (before this was fixed) is to use >count(1) > which achieves the same effect. > -W Thanks a lot Wolfangm, it now works as a charm! -Stathis > > On 11 November 2010 19:30, wrote: >> Hi List, >> >> I'm trying to count the number of objects I ha

Re: [rules-users] accumulate vs collect

2010-11-12 Thread rouvas
Edson Tirelli wrote: >Can you show us the stack trace? What version of Drools are you using? I am using Drools.5.0.1. For this accumulate: v945 : Number ( doubleValue >= 1 ) from accumulate ( p : t_1 ( c_6 >= 20100512 && c_7 == "5" ) , count(p) ) stack trace follows: EXCEPTION ERROR jav

[rules-users] accumulate vs collect

2010-11-11 Thread rouvas
Hi List, I'm trying to count the number of objects I have in the Working Memory using accumulate, but I'm having a ClassCastException thrown at me. Using a variant with collect, everything work OK. Can someone shed some light on this issue? Is it related to https://jira.jboss.org/browse/JBRULES-

Re: [rules-users] How can i delete any object after executing the rules from the memory.

2010-10-22 Thread rouvas
Michael Anstis wrote: > If you use a StatelessKnowledgeSession you won't need to remove the old > facts. > > If however you want to use a StatefulKnowledgeSession for other reasons > the > insert method returns a FactHandle that can be later used to retrieve the > fact: ksession.retract(factHandle)

Re: [rules-users] Using from with named queries

2010-07-28 Thread rouvas
Wolfang, Wolfgang Laun wrote: > Don't be too keen on using "from" in connection with queries. The simple > reason is that queries return nothing but what rules can do just as well. > > Thus, getting all pairs of Person's and Restaurant's with matching "food" > and "zipcode", the straightforward LH

[rules-users] Using from with named queries

2010-07-28 Thread rouvas
Hello list, I'm using Drools.5.0.1 and I am trying to comprehend how to used the "from" keyword over a named query. I've googled this: http://blog.athico.com/2007/06/chained-from-accumulate-collect.html where it states: p : Person( ) Restaurant( food == p.favouriteFood ) from

Re: [rules-users] newbie, Expressing a rule in different ways

2010-01-31 Thread rouvas
Edson Tirelli wrote: >Looks like a bug on the type enforcement that Drools and MVEL try to > apply. Even with the generic type erasure, there should be no problems > with > either expression. > >What specific versions of Drools and MVEL are you using? I am using Drools.5.0. I do not know t

Re: [rules-users] newbie, Expressing a rule in different ways

2010-01-31 Thread rouvas
Wolfgang Laun wrote: > 2010/1/31 > >> Wolfang, >> >> thank you very much for your reply. >> >> Your assumptions are correct and your explanation makes sense. >> Unfortunately, I cannot understand why this happens. >> >> > It may very well be an implementation restriction; whether it can be > remov

Re: [rules-users] newbie, Expressing a rule in different ways

2010-01-30 Thread rouvas
Wolfang, thank you very much for your reply. Your assumptions are correct and your explanation makes sense. Unfortunately, I cannot understand why this happens. Let me explain things a bit. I will use the shorthand notation "IUEcop" to refer to the "incrementalUpdateOfEconomicOperators" object.

[rules-users] newbie, Expressing a rule in different ways

2010-01-29 Thread rouvas
Can you please explain why the second form of the same (as it seems to me) rule does not work? This works: rule "takeTwo" when $c : CD713AType( Body.incrementalUpdateOfEconomicOperators.traderAuthorisation.size != 0 ) $t : TraderAuthorisationType ( $t.OperatorRole.size == 0) from $c.Bod