Re: [rules-users] Drools Roadmap - Planned Release 6.0.0.Final release date

2013-10-28 Thread Greg Barton
This seems like a recipe for trouble.  Devs could be continually working on the latest and greatest, moving on when they're "complete," but leaving releases in their wake that have failing tests.  Unreleasable releases could continually pile up. From: Mark Pro

Re: [rules-users] Monitoring sensor parameter change

2013-06-11 Thread Greg Barton
rule "first Reading" when    $r: Reading()    not LastReading( this == $r ) then    insert( new LastReading( $r ) ); end From: Wolfgang Laun To: Rules Users List Sent: Tuesday, June 11, 2013 12:07 PM Subject: Re: [rules-users] Monitoring sensor parameter chan

Re: [rules-users] Dedication to Wolfgang Laun - Thank You

2013-01-06 Thread Greg Barton
Agreed.  You've awesome Wolfgang.  Thanks for all you've contributed to drools. From: Salaboy To: Rules Users List Cc: Rules Users List Sent: Sunday, January 6, 2013 10:11 AM Subject: Re: [rules-users] Dedication to Wolfgang Laun - Thank You Definitely, pe

Re: [rules-users] DROOLs 'Guarded entry/block' tactics for Rules synchronization and ordinality?

2012-11-29 Thread Greg Barton
> > From: rules-users-boun...@lists.jboss.org > [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton > Sent: Thursday, November 29, 2012 12:00 PM > To: Rules Users List > Subject: Re: [rules-users] DROOLs 'Guarded entry/block' tactics for Rul

Re: [rules-users] DROOLs 'Guarded entry/block' tactics for Rules synchronization and ordinality?

2012-11-29 Thread Greg Barton
Have you looked at agenda-group or ruleflow-group?  You've reinvented some of their functionality here.   From: "Cotton, Ben" To: "rules-users@lists.jboss.org" Cc: "O'Brien, Patrick" Sent: Thursday, November 29, 2012 10:47 AM Subject: [rules-users] DROOLs '

Re: [rules-users] Inserting Different Objects Of Same Class !

2012-11-27 Thread Greg Barton
Are the values in the list ever tested? (With rules conditionally firing if the contents of a list changes.)  In the rules you've provided so far they are not.  If this is the case then there's no need to match them in the conditions and the use of globals is just fine.  The only reason to match

Re: [rules-users] Best practice to use heap memory effectively

2012-11-01 Thread Greg Barton
Can't you sum up counts from multiple sessions?  Remove the count from the session before you dispose and keep that total count around until the end of the day. Unless there's something complex you need to do with all of the Alarm facts at the end of the 24 hour period there's no need to keep t

Re: [rules-users] Best practice to use heap memory effectively

2012-11-01 Thread Greg Barton
Why not just maintain a counter object in working memory?  Just increment it whenever an alarm fact is inserted.  Reset or retract it at the end of the day. From: mohan To: rules-users@lists.jboss.org Sent: Thursday, November 1, 2012 3:15 PM Subject: Re: [rule

Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue

2012-10-30 Thread Greg Barton
You can stop the recursive firing by 1) having conditions in the rules that stop recursion, (similar to a stop condition in a for loop) and 2) using update or modify to tell the rules engine that the properties have changed.   From: kina06 To: rules-users@list

Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue

2012-10-30 Thread Greg Barton
This is a list for support of the drools product, but there is some expectation that you will figure out some basic functionality by reading the docs and putting some thought into it. :) In general, though, the "next rule" is whatever rule matches the objects currently in working memory.  If yo

Re: [rules-users] refactoring "complex" conditon to use "in" operator

2012-10-26 Thread Greg Barton
Also, I tried putting an underscore in front of the variable name, like in your code.  Still no problem with Dools 5.4. (Project attached.) From: Greg Barton To: Rules Users List Sent: Friday, October 26, 2012 1:34 PM Subject: Re: [rules-users] refactoring

Re: [rules-users] refactoring "complex" conditon to use "in" operator

2012-10-26 Thread Greg Barton
1:07 PM Subject: Re: [rules-users] refactoring "complex" conditon to use "in" operator No, that’s not it.  Using “1.0” causes the exact same syntax error.   From:rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton S

Re: [rules-users] refactoring "complex" conditon to use "in" operator

2012-10-26 Thread Greg Barton
Maybe because the 1.0 is in single quotes, and not double quotes, like the others? From: "Cotton, Ben" To: Rules Users List Sent: Friday, October 26, 2012 12:15 PM Subject: [rules-users] refactoring "complex" conditon to use "in" operator Hi,   The foll

Re: [rules-users] How to execute a rule only when a fact is retracted

2012-10-17 Thread Greg Barton
Along the same lines, have a boolean attribute called "markedForDeletion" on the fact.  Set it to true and match rules off of that, with a low priority rule that retracts it when all others are done. And if you can't modify the original fact class, like Wolfie says below, insert a control fact

Re: [rules-users] rule infinitely loops, appears to be depending on naming on variable

2012-10-05 Thread Greg Barton
You could implement a custom bit set with internal loops that are apt to be unrolled by the jit.From: Mark Proctor To: Rules Users List Sent: Friday, October 5, 2012 7:17 PM Subject: Re: [rules-users] rule infinitely loops, appears to be depending on naming on variable There is a clas

Re: [rules-users] Avoid caching method results within non fact objects

2012-08-02 Thread Greg Barton
The alternative you're attempting using "from" is potentially less efficient than the first one you tried. :) Can you alter the CurrentFact objects to hold current and previous state?  That way you avoid the matching step altogether. rule "Interesting Event" when $currentFact: CurrentFact(state

Re: [rules-users] Query for a fact, and concurrent rule execution

2012-05-02 Thread Greg Barton
Indeed! And there's no reason you couldn't do the procedure below with multiple concurrent stateful sessions. In fact, this might be the best way, as when the support facts change you could create new sessions and not disrupt the service. (And if the support facts are immutable and not changed

Re: [rules-users] Rule to load facts with pagination

2012-05-01 Thread Greg Barton
I agree with Wolfgang that we need more information, but here's two general pieces of advice: 1) If the object loading involves little or no business logic then do it from java. (i.e. it's "load 1 objects and go") 2) It's usually more efficient to dispose of a session than to remove all ob

Re: [rules-users] Performace Issues drools

2012-04-23 Thread Greg Barton
You can simplify the last condition to: not LabTest(testId == $test.testId) I think it's faster, too. --- On Mon, 4/23/12, Welsh, Armand wrote: > From: Welsh, Armand > Subject: Re: [rules-users] Performace Issues drools > To: "'Rules Users List'" > Date: Monday, April 23, 2012, 11:13 AM > I

Re: [rules-users] Having problems with traits in 5.4.0beta2

2012-03-11 Thread Greg Barton
It's not, but can easily be. I just tried that, though, and the same exception happened. DRL attached. It's an old attempt to update the classic monkeys and bananas example to make it a bit more interesting: wandering monkeys, stacking blocks, a bit of world physics, stuff like that. I haven

Re: [rules-users] Having problems with traits in 5.4.0beta2

2012-03-11 Thread Greg Barton
When I try that declaration syntax I get the following exception loading the code: Exception in thread "main" java.lang.NullPointerException at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:488) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase

[rules-users] Having problems with traits in 5.4.0beta2

2012-03-10 Thread Greg Barton
I'm trying out the traits feature and I'm having some problems. I'm preparing simple Monkeys and Bananas example with existing classes that I want to add traits, but when I try adding a trait (either declared in DRL or as a static interface) I'm getting an exception thrown from the call to don(

Re: [rules-users] setting different value in consequence ( RHS part) based on a conditional check

2012-02-06 Thread Greg Barton
Nonsense.   Rules engines can solve many problems much better than a monotonic programming.  The primary area where this is the case are the "watch for given conditions, then act" problems: monitoring, command and control, models, and simulations.   Rule engines are particularly well suited for t

Re: [rules-users] Why isn't my rule firing??

2012-01-18 Thread Greg Barton
This is by design. Unless you modify an object and inform the inference engine of the change, rule conditions will not be re-evaluated. If you want the rule to re-fire you must tell the engine to reconsider the old NotificationEvents via update() or modify(). A rule like this would do it ever

Re: [rules-users] StatefulKnowledgeSession and multi-threaded processing

2011-12-20 Thread Greg Barton
@ http://www.jbug.com.ar > - Mauricio "Salaboy" Salatino - > > On 20/12/2011, at 22:52, Greg Barton > wrote: > > > Absolutely.  Anyone who wants to build a high > performance rules system should watch it. > > > > --- On Tue, 12/20/11, Mauricio Salatin

Re: [rules-users] StatefulKnowledgeSession and multi-threaded processing

2011-12-20 Thread Greg Barton
Absolutely. Anyone who wants to build a high performance rules system should watch it. --- On Tue, 12/20/11, Mauricio Salatino wrote: > From: Mauricio Salatino > Subject: Re: [rules-users] StatefulKnowledgeSession and multi-threaded > processing > To: "Rules Users List" > Date: Tuesday, Dec

Re: [rules-users] Problem evaluating with Enum

2011-09-13 Thread Greg Barton
If the attribute IPhoneSentences.Sentence.descriptor is a Collection then this makes perfect sense.  The elements are instances of ETimeConstraint (what your second rule tests for) not instances of the enum class definition ETimeConstraint. (what your first rule tests for...maybe...) However, I

Re: [rules-users] Condition syntax to access Map

2011-07-29 Thread Greg Barton
Ah, other engines don't do nested accessors because they're wimps.  WIMPS! :) --- On Fri, 7/29/11, Mark Proctor wrote: From: Mark Proctor Subject: Re: [rules-users] Condition syntax to access Map To: rules-users@lists.jboss.org Date: Friday, July 29, 2011, 8:52 AM On 29/07/

Re: [rules-users] Condition syntax to access Map

2011-07-28 Thread Greg Barton
+1 Naw +billion --- On Thu, 7/28/11, Edson Tirelli wrote: From: Edson Tirelli Subject: Re: [rules-users] Condition syntax to access Map To: "Rules Users List" Date: Thursday, July 28, 2011, 1:13 PM    All,    I think we need to differentiate paradigms here. When using rules, contrary to

Re: [rules-users] One rule calling another rule

2011-07-08 Thread Greg Barton
Rules do not "call" other rules.  A rule can change the value of an object in working memory, and if another rule is triggered by that change (it's conditions are matched) then that other rule could fire.  This is done without calling the subsequent rule directly.  You do need to notify the rule

Re: [rules-users] drools dynamic LHS

2011-05-24 Thread Greg Barton
This design would get my vote, especially if the rules for each state diverge even slightly. The thing is, this kind of divergence can become a nightmare over time if you design too tightly to any initial requirements. The initial divergence always increases. :) One main selling point for rule

Re: [rules-users] drools dynamic LHS

2011-05-24 Thread Greg Barton
WHat you're describing is a rule base, which is what writing drl (or using guvnor) is for in the first place. :) --- On Tue, 5/24/11, marunam wrote: > From: marunam > Subject: Re: [rules-users] drools dynamic LHS > To: rules-users@lists.jboss.org > Date: Tuesday, May 24, 2011, 2:17 PM > I unde

Re: [rules-users] Business Logic in Java

2011-05-24 Thread Greg Barton
Use eval() to call the java logic, but realize that by doing what you describe you're subverting the need to use a rule engine in the first place. --- On Tue, 5/24/11, sdinoo wrote: > From: sdinoo > Subject: [rules-users] Business Logic in Java > To: rules-users@lists.jboss.org > Date: Tuesday

Re: [rules-users] The update function inside a rule

2011-03-30 Thread Greg Barton
Upgrade to 5.2M1 and the CPU overuse problem goes away. --- On Wed, 3/30/11, marc wrote: > From: marc > Subject: Re: [rules-users] The update function inside a rule > To: rules-users@lists.jboss.org > Date: Wednesday, March 30, 2011, 5:47 AM > I was using only one fireAllRules() > after insert(

Re: [rules-users] accumulate min over java.util.Date

2011-03-25 Thread Greg Barton
$min: Number( intValue > 100 ) from accumulate( X( $y: y ), min( $y ) ) > > any more (unless I'm very much mistaken). > > -W > > > > On 25 March 2011 03:56, Greg Barton wrote: > Well, if it can work that way it should. I'd say open a JIRA and request >

Re: [rules-users] accumulate min over java.util.Date

2011-03-24 Thread Greg Barton
Well, if it can work that way it should. I'd say open a JIRA and request that feature. It works with the "principle of least confusion." :) --- On Thu, 3/24/11, jkrupka wrote: > From: jkrupka > Subject: Re: [rules-users] accumulate min over java.util.Date > To: rules-users@lists.jboss.org >

Re: [rules-users] accumulate min over java.util.Date

2011-03-24 Thread Greg Barton
That's because a java.util.Date is not a java.lang.Number. :) You can get the long value behind the Date by calling Date.getTime(), though. Try that. --- On Thu, 3/24/11, jkrupka wrote: > From: jkrupka > Subject: [rules-users] accumulate min over java.util.Date > To: rules-users@lists.jboss.

Re: [rules-users] Starting engine using fireUntilHalt and inserting no facts results in 50% CPU usage

2011-03-18 Thread Greg Barton
Confirmed using the standalone test project from a previous thread using 5.2.0.M1. (attached) --- On Fri, 3/18/11, lexsoto wrote: > From: lexsoto > Subject: Re: [rules-users] Starting engine using fireUntilHalt and inserting > no facts results in 50% CPU usage > To: rules-users@lists.jboss.or

Re: [rules-users] Basic doubt regarding Drools Fusion - @expires

2011-03-17 Thread Greg Barton
hursday, March 17, 2011, 10:47 AM    To be honest, I believe so, but didn't profiled it extensively. I used fireUntilHalt() in my Webinar yesterday on a live demo and it worked nicely.    Edson 2011/3/17 Greg Barton Has the performance problem with fireUntilHalt been fixed in 5.2?   --

Re: [rules-users] Basic doubt regarding Drools Fusion - @expires

2011-03-17 Thread Greg Barton
Has the performance problem with fireUntilHalt been fixed in 5.2?   --- On Thu, 3/17/11, Makewise - Vitor Rui Mendonça wrote: From: Makewise - Vitor Rui Mendonça Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires To: "'Rules Users List'" Date: Thursday, March 17, 2011,

Re: [rules-users] Open file leak in Drools Compiler

2011-03-16 Thread Greg Barton
mpiler > To: "Rules Users List" > Cc: "Greg Barton" > Date: Wednesday, March 16, 2011, 12:18 PM > Isn't it regarded as bad practice to > rely on the finalize() method > called by the garbage collector to release such resources? > > Chris >

Re: [rules-users] Open file leak in Drools Compiler

2011-03-16 Thread Greg Barton
Only if garbage collection never runs. Then you'd already be in trouble. :) --- On Wed, 3/16/11, Chris Selwyn wrote: > From: Chris Selwyn > Subject: [rules-users] Open file leak in Drools Compiler > To: "Drools users" > Date: Wednesday, March 16, 2011, 11:49 AM > I am running Drools (actually

Re: [rules-users] alert via email

2011-03-15 Thread Greg Barton
You want the java mail API: http://www.oracle.com/technetwork/java/javamail/index.html --- On Tue, 3/15/11, Esteban Aliverti wrote: From: Esteban Aliverti Subject: Re: [rules-users] alert via email To: "Rules Users List" Date: Tuesday, March 15, 2011, 7:42 AM AFAIK Drools doesn't provides out

Re: [rules-users] Misunderstanding salience?

2011-03-09 Thread Greg Barton
"Control facts" is a term for objects in working memory that are not directly derived from outside data, or used as output.  As their name implies, they're used to explicitly control flow of the rules.   --- On Wed, 3/9/11, Peter Ashford wrote: From: Peter Ashford Subject: Re: [rules-users] M

Re: [rules-users] Best approach for handling parallel requests for a stateful rules session

2011-03-08 Thread Greg Barton
They submit the commands to an execution queue, and they're executed in the order received in a thread safe manner. And note there's an asyncFireAllRules() method, so you can time when rules fire. As for whether objects are fed into working memory while rules are firing, I'm not sure, but tha

Re: [rules-users] Best approach for handling parallel requests for a stateful rules session

2011-03-08 Thread Greg Barton
Take a look at the org.drools.StatefulSession.async*() methods. I've used them in a multithreaded context before. --- On Tue, 3/8/11, jkrupka wrote: > From: jkrupka > Subject: [rules-users] Best approach for handling parallel requests for a > stateful rules session > To: rules-users@lists.

Re: [rules-users] Object updated as rules are running

2011-02-25 Thread Greg Barton
e engine about changes of fact objects is indeed  discussed, and all three techniques of doing that are covered. -W 2011/2/25 Jon Gil Can you please provide the syntax or point me in the direction of an example? 2011/2/25 Greg Barton It's done in the rule action of the first

Re: [rules-users] Object updated as rules are running

2011-02-25 Thread Greg Barton
es Users List" Date: Friday, February 25, 2011, 10:14 AM How do we do that?  Since we are using the rules server, all we are doing is calling with an HTTP call with the object and the rules flow we want to call. We then receive back the results as the HTTP response.  2011/2/25 Greg Barton

Re: [rules-users] Object updated as rules are running

2011-02-25 Thread Greg Barton
Did you notify the engine that your data has been updated? http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e1436 See section 3.3.3.1.3 --- On Fri, 2/25/11, Jon Gil wrote: From: Jon Gil Subject: [rules-users] Object updated as rules are running To:

Re: [rules-users] unsolved myth regarding transitive closure using insertlogical...

2011-02-22 Thread Greg Barton
Implementations of equals() and hashCode() should always agree: http://www.javapractices.com/topic/TopicAction.do?Id=28 --- On Tue, 2/22/11, Simon Chen wrote: > From: Simon Chen > Subject: Re: [rules-users] unsolved myth regarding transitive closure using > insertlogical... > To: "Rules Users

Re: [rules-users] hardcore masterclass (west london)

2011-02-12 Thread Greg Barton
I'd be interested in listening in if you can webcast it. GreG On Feb 12, 2011, at 10:27, Mauricio Salatino wrote: > I'm really interested in that kind of courses, but I'm pretty far away. Can I > help you creating material and content for those courses? In that way we can > share the meetups

Re: [rules-users] Writing a pattern in which each event constraint depends on the previous event

2011-01-30 Thread Greg Barton
Yes, the accumulate function itself should maintain the sort internally. @OlliSee : See the thread titled "How to write a rule that fires when it matches against specific facts in working memory." --- On Sun, 1/30/11, Wolfgang Laun wrote: From: Wolfgang Laun Subject: Re: [rules-users] Writing a

Re: [rules-users] Writing a pattern in which each event constraint depends on the previous event

2011-01-29 Thread Greg Barton
See the current discussion of accumulate functions. That should satisfy your need. GreG On Jan 29, 2011, at 10:18, OlliSee wrote: > > Hello everyone. > > Lets say we have StockTicks... > Is it possible to detect a monotonically decreasing StockTick stream over a > window? > > If I knew

Re: [rules-users] Question about Drools accessing a global HashMap and comparing it to an object value

2011-01-27 Thread Greg Barton
Not a bug in drools, but a bug in my brain. :) The first term in a condition element must come from the object, and objCode was bound in the previous object. I didn't test that rule before posting, so my bad. GreG On Jan 27, 2011, at 15:15, mviens wrote: > > Hi Greg, > > Thank you for the

Re: [rules-users] Question about Drools accessing a global HashMap and comparing it to an object value

2011-01-25 Thread Greg Barton
You really shouldn't be matching an entire collection of objects like that. Think of each rule as capturing one "example" of an object in a given state, and doing something when that object is found. So think of your first rule like this: rule "Check for null State"    when        obj : MyOb

Re: [rules-users] Why Using "from" Always Return A New Fact?

2011-01-20 Thread Greg Barton
When you say "owning 100% of the language syntax" does that include the RHS? Just curious. GreG On Jan 19, 2011, at 22:04, Edson Tirelli wrote: > As of Drools 5.1.1, drools looks at the expression in "from" as a > black box. Every time it is executed, drools creates a new fact handle > to w

Re: [rules-users] Salience

2011-01-19 Thread Greg Barton
Another way is to keep bugging Mark and Edson to put in an else clause. :P GreG On Jan 19, 2011, at 12:56, Wolfgang Laun wrote: > Either you define a rule covering all "else" cases, which, in your > case, could be > > rule "#catch-all" > when > $i : Item( type != 1 && != 2 ) > then > retract

Re: [rules-users] Different rule fires when debugging vs running after upgrading to 5.1.1

2011-01-19 Thread Greg Barton
You've already pointed to it yourself. Rules execution should be thought of in the same way you approach concurrent programming. Execution can (and should) be able to happen in any order possible. Only the current logical state of working memory should influence the next step in execution, wi

Re: [rules-users] how do you select from a global List in decisiontable

2011-01-13 Thread Greg Barton
Using globals in rule conditions is generally a bad idea. This is because changes to the globals are not tracked automatically so rule firing is 1) not responsive to data changes, and 2) somewhat random when change happens. Basically, avoid it. GreG On Jan 13, 2011, at 15:56, Gregory Mace w

Re: [rules-users] Swing GUI & Drools

2011-01-05 Thread Greg Barton
If the business logic is this simple then no, drools is not a good fit because business rules are not necessary. The only thing that would make it necessary is if you had business users writing rules, but as far as I know drools 2.5 doesn't have much in the way of modern rules management. (unli

Re: [rules-users] Drools-Spring Config for Knowledge Agent

2010-12-29 Thread Greg Barton
Also, sometimes emails I send to the list are delayed as much as 12 hours. Maybe it's because I post from a yahoo account and the spam filter pushes back. Could be that as well. GreG On Dec 29, 2010, at 0:18, Mark Proctor wrote: > On 29/12/2010 06:10, KR - wrote: >> >> few posts mine and m

Re: [rules-users] Drools-Spring Config for Knowledge Agent

2010-12-28 Thread Greg Barton
There is no moderation system on this list. I've been posting here for quite a while and have seen no evidence of of one. And if there were I'm sure I would have pissed off someone enough to trip it by now. :) GreG On Dec 28, 2010, at 6:40, krkaleraj wrote: > > Turner, > > Unfortunately

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

2010-12-23 Thread Greg Barton
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 subgraphs then it contains a cartesian product. You can make this more sophisticated by excluding cl

Re: [rules-users] Multiple bindings with the same type

2010-12-08 Thread Greg Barton
Still won't work, and it's worse than you think. The main problem is that drools (and any rules engine) will match on all possible combinations of objects in working memory that match the right hand side of the rule. So let's say you insert two lists, call them A and B. Your rule will fire f

Re: [rules-users] new to Drools: modeling issues

2010-12-06 Thread Greg Barton
+1 GreG On Dec 6, 2010, at 5:03, "Swindells, Thomas" wrote: > In my experience no-loop is pretty much worthless as it only prevents the > most trivial type of loops (a rule reactivating itself). It provides no help > for the most common type of loop where multiple rules modify the same objec

Re: [rules-users] Rules in App Server Error

2010-12-03 Thread Greg Barton
rammer, not just a Drools expert - yet.  If you took the time to read the post, you would have found that the answer that was provided to me “DIDN’T WORK”.  Never mind, I’ll figure it out myself.  Goodby!   From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On

Re: [rules-users] Rules in App Server Error

2010-12-03 Thread Greg Barton
You made the same error in three other places. Fix them. Are you familiar with the java language? GreG On Dec 3, 2010, at 15:15, "John McKim" wrote: > Thanks for the reply Mauricio. I tried what you said using this modified > rule: > > > > rule "medicalHistoryBleedingRiskFactors.gastri

Re: [rules-users] Drools logging to console.

2010-11-28 Thread Greg Barton
You're just commenting out the references to the loggere, but not the construction. (if the line breaks are the same in your original code as they are below.) GreG On Nov 28, 2010, at 6:54, Nadav Hashimshony wrote: > my drools application write debug and info message to the console. > > i c

Re: [rules-users] StatefulKnowledgeSession.startProcess not thread-safe ?

2010-11-26 Thread Greg Barton
org.drools.StatefulSession has the async* methods, which are thread safe.  I'm not sure if org.drools.runtime.StatefulKnowledgeSession.execute(Command command) uses them behind the scenes, though. --- On Fri, 11/26/10, Wolfgang Laun wrote: From: Wolfgang Laun Subject: Re: [rules-users] Statef

Re: [rules-users] Replacement for eval

2010-11-16 Thread Greg Barton
know whether this is the expected behaviour? (Since normally I expect the action of that particular rule to be executed straight after it's fired.) Am I missing something here? Thanks. 2010/11/16 Greg Barton If you use bean property conventions for naming your methods you can use a

Re: [rules-users] Replacement for eval

2010-11-16 Thread Greg Barton
If you use bean property conventions for naming your methods you can use a regular condition element. for instance, you could rename emptyMessageFinder() to isMessageFound() or getMessageFound() and your condition would look like this: when m : Message(messageFound == true) then ... end And

Re: [rules-users] Rules selection logic

2010-11-13 Thread Greg Barton
Also, the use of doubles in an == test is problematic. Not that it would cause this particular problem, but it will cause others. GreG On Nov 13, 2010, at 11:52, Wolfgang Laun wrote: Are you using the latest (5.1.1) release? Is the duplicated rule in another DRL file and does it have exactly

Re: [rules-users] check if a

2010-11-01 Thread Greg Barton
$value : Value( $value : value, // other restrictions ) $object : MyObject( $value not memberOf valueList ) GreG On Nov 1, 2010, at 9:55, Tina Vießmann wrote: Is it possible to write the following conditions without using eval? $object : MyObject ( $valueList : valueList ) // of ty

Re: [rules-users] Declaring events programmatically

2010-10-25 Thread Greg Barton
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-fusion/html/ch02.html#d0e241 Use type declaration and @role(event) --- On Tue, 10/26/10, Samuli Saarinen wrote: > From: Samuli Saarinen > Subject: [rules-users] Declaring events programmatically > To: "Rules Users List" > Date: T

Re: [rules-users] Starting engine using fireUntilHalt and inserting no facts results in 50% CPU usage

2010-10-25 Thread Greg Barton
AbstractWorkingMemory.queueWorkingMemoryAction() via ReteooRuleBase.newStatefulSession(). Anyway, I'll move discussions of possible solutions over to the dev list, (crossposting now) or a JIRA if you'd prefer that. --- On Mon, 10/25/10, Greg Barton wrote: > From: Greg Barton > Subject: Re: [rules-users] Start

Re: [rules-users] Starting engine using fireUntilHalt and inserting no facts results in 50% CPU usage

2010-10-25 Thread Greg Barton
I was going to look at this at some point. I guess that point will be tonight. :) GreG On Oct 25, 2010, at 15:02, Edson Tirelli wrote: No worries, it is a good starting point anyway. Hopefully someone can continue from there or I will eventually fix it. Just a lot of stuff in my plate alrea

Re: [rules-users] Stateless K-Session but no Sequential Mode

2010-10-20 Thread Greg Barton
The stateless session is just a convenience wrapper around the stateful session. GreG On Oct 20, 2010, at 6:52, "Swindells, Thomas" wrote: That is enough reason in itself - why go to the bother of having to do inserts, fire all rules and dispose separately when stateless sessions do that a

Re: [rules-users] Pattern aggregation

2010-10-18 Thread Greg Barton
It would be nice if we had an example of some rules. That way we can rule out obvious performance killers like cartesian products and multiple "from" clauses in one rule. GreG On Oct 18, 2010, at 5:19, Tim 4076 wrote: Hi, I'm trying to use drools to do grouping of data according to patterns

Re: [rules-users] Check if fact is subset of items in the rule

2010-10-11 Thread Greg Barton
Try the custom operator Wolfgang suggested. Then rete will be used. --- On Mon, 10/11/10, kpandey wrote: > From: kpandey > Subject: Re: [rules-users] Check if fact is subset of items in the rule > To: rules-users@lists.jboss.org > Date: Monday, October 11, 2010, 8:23 PM > > I got it to work u

Re: [rules-users] fireUntilHalt and timing of rule activations

2010-10-05 Thread Greg Barton
ghts? Norman From: Wolfgang Laun To: Rules Users List Sent: Sun, October 3, 2010 10:51:08 PM Subject: Re: [rules-users] fireUntilHalt and timing of rule activations 2010/10/4 Greg Barton If you don't have some way of associating the data with a particular Latch it's easy to ge

Re: [rules-users] fireUntilHalt and timing of rule activations

2010-10-03 Thread Greg Barton
when Latch( name == "CountAs", $v : value ) ... But be aware that changes to Latch objects will retrigger rules that have fired previously; so with this approach you'll have to make sure to retract facts when they have been processed. -W 2010/10/3 Greg Barton Nope,

Re: [rules-users] fireUntilHalt and timing of rule activations

2010-10-02 Thread Greg Barton
Nope, you're not missing anything. What you need is a control object of some sort thst's inserted after all of the "real" data is inserted. (See attached project for an example.) Rules will look like this, if the control object is called BatchLatch and data objects A: rule "CountAs" di

Re: [rules-users] Multi threaded rule engine question.

2010-09-27 Thread Greg Barton
I wouldn't reuse a stateless session. You could reuse a stateful session and clean up between runs, but session creation is not that expensive. (and easily less expensive than cleanup of a stateful session, mattering on the complexity of your rules) GreG On Sep 27, 2010, at 8:39, Nadav Hashim

Re: [rules-users] LHS compare two lists

2010-09-19 Thread Greg Barton
Also, you can avoid duplicate AcquiredCertification errors and o(n^2) run time by making all Lists into Sets. GreG On Sep 19, 2010, at 15:57, Esteban Aliverti wrote: > You can avoid the eval setting the size restriction inside the list: > > List(size == $certifications.size) from collect... >

Re: [rules-users] Hold the Beans!

2010-09-10 Thread Greg Barton
As opposed to data wrapped in a Fact?  I suppose you could use java.util.Map instead of Fact and write rules around that.  Or you could use a strongly typed POJO, which drools is optimized for.  For translating the xml use something like JAXB or XStream. (I'm preferring XStream these days.) ---

Re: [rules-users] Loading facts and memory size limits

2010-09-09 Thread Greg Barton
Do you have rules which relate two arbitrary customers together? If the answer is no (and even a limited yes) then the problem can process customers in parallel. That means you can break the processing down into smaller chunks and you don't need all customers in memory at once. GreG On Sep 9

Re: [rules-users] Loading facts and memory size limits

2010-09-08 Thread Greg Barton
Considering that just an Object array of 10 million Objects consumes 115MB of memory, I think loading 1 billion facts will be stretching the limits of the VM all by itself. (and that's java.lang.Object with no fields...) GreG On Sep 8, 2010, at 10:31, bellios wrote: Hi all, i have read the D

Re: [rules-users] copyright violation issue on Drools

2010-08-31 Thread Greg Barton
This is not the appropriate forum for copyrighgt issues. GreG On Aug 31, 2010, at 9:40, 山本 裕介 wrote: Hi, There's a copyright violation issue on Drools 5.1 release. Please remove the changes listed in the following issue. https://jira.jboss.org/browse/JBRULES-2660 Thanks, Yusuke __

Re: [rules-users] Caching results in temperory variables

2010-08-12 Thread Greg Barton
You must either update an existing working memory object or insert a new working memory object with the results. That's how rules communicate with each other. GreG On Aug 12, 2010, at 10:31 AM, Manav wrote: Hi, I am using the version 5.x of drools and i have a scenario where i want to hold

Re: [rules-users] functions inside fact type declaration?

2010-08-09 Thread Greg Barton
+1 on the full constructor. GreG On Aug 9, 2010, at 3:58 PM, Edson Tirelli wrote: I thought about adding that, but I feel like we would just be reimplementing java, in this case. So, if you need anything else other than simple java beans, you should implement it as a java class. Rega

Re: [rules-users] Problem with DRL language/ XLS decision tables.

2010-07-22 Thread Greg Barton
Considering that googling on "rule latch" will return this thread on gmane as the 2nd link, you might find research difficult. :)  I think Tom coined that term in this context, but it fits.  The basic idea is that you use an object as an indicator of what processing has happened, and whether or

Re: [rules-users] Problem with DRL language/ XLS decision tables.

2010-07-22 Thread Greg Barton
You could always have a pool of StatefulSessions that you reuse. (This would allow you to run concurrently in multiple threads as well.)  As long as these billions of facts don't need to interact that'll work fine.  However I'd suggest that you try the "rule latch" method that Thomas suggested. 

Re: [rules-users] Error while executing business Rule

2010-07-15 Thread Greg Barton
Yoda? You is that? GreG On Jul 15, 2010, at 9:53, Puneet duggal wrote: > but after that error my rules on none of the screens work why so > > On 7/15/10, Swindells, Thomas wrote: > Your rules are probably written wrong, or your application, or you have a > dodgy computer, or you have a race

Re: [rules-users] Improving Drools Memory Performance

2010-07-11 Thread Greg Barton
For #2 try a custom operator for "connects". GreG On Jul 12, 2010, at 12:56 AM, Jevon Wright wrote: Hi Wolfgang and Mark, Thank you for your replies! You were correct: my eval() functions could generally be rewritten into Drools directly. I had one function "connectsDetail" that was constrain

Re: [rules-users] Problem Setting globals in drools session

2010-07-06 Thread Greg Barton
s between components >such that they share a common class. --- On Tue, 7/6/10, djerir smail <1983dje...@gmail.com> wrote: > From: djerir smail <1983dje...@gmail.com> > Subject: Re: [rules-users] Problem Setting globals in drools session > To: "Greg Barton" &

Re: [rules-users] rules-users Digest, Vol 44, Issue 15

2010-07-06 Thread Greg Barton
Message: 3 Date: Tue, 6 Jul 2010 09:05:16 -0700 (PDT) From: Greg Barton Subject: Re: [rules-users] How is this possible? To: Rules Users List Cc: "Richter, Alexander" , "" Message-ID: <376326.67572...@web81506.mail.mud.yahoo.com> Content-Type: text/p

Re: [rules-users] How is this possible?

2010-07-06 Thread Greg Barton
Does the amount of heap allocated affect it? I'm wondering if there's a hidden OutOfMemoryError happening. (Which, if you're catching Throwable anywhere, is a possibility. Use the HeapDumpOnOutOfMemoryError VM flag to diagnose this.) And this should be easy to reproduce in your unit tests: ju

Re: [rules-users] Problem Setting globals in drools session

2010-07-06 Thread Greg Barton
Having it twice in the classpath would make no diffence (at least with the default java classloader) as only the first one in the path is used. Having multiple copies of a class in the classpath is generally not a good idea because it leads to confusion, but it would not cause this behavior. (m

Re: [rules-users] Problem Setting globals in drools session

2010-07-05 Thread Greg Barton
Does your application use multiple classloaders? It's possible for two instances with the same class definition to not have "equal" classes if the class is loaded twice from different classloaders. --- On Mon, 7/5/10, djerir smail <1983dje...@gmail.com> wrote: > From: djerir smail <1983dje...@g

Re: [rules-users] Arden Syntax support in Drools / Guvnor?

2010-07-02 Thread Greg Barton
> Basically, I'm looking for a way to *import* Arden MLMs > into > Drools/Guvnor, and then be able to modify them through a > GUI, much like > I would rules natively done in Drools/Guvnor. > > Thanks though, I will still check out the bytecode compiler > sometime.

  1   2   3   4   >