Re: [rules-users] Testing for non-existance of an object in list

2013-08-04 Thread Joe Ammann
On 08/04/2013 10:05 AM, Wolfgang Laun wrote: > The rule is correct, and it works with similar scenarios.There may be > a bug, due to circumstances. Can you post a simple but complete set of > files to reproduce this? > You're perfectly right :-) The rule was correct, but as I wrote in an earlier po

Re: [rules-users] Testing for non-existance of an object in list

2013-08-04 Thread Wolfgang Laun
The rule is correct, and it works with similar scenarios.There may be a bug, due to circumstances. Can you post a simple but complete set of files to reproduce this? -W On 03/08/2013, Joe Ammann wrote: > Hi all > > I'm still struggling with the handling of lists and membership in the > LHS of ru

Re: [rules-users] Testing for non-existance of an object in list

2013-08-04 Thread Joe Ammann
Sorry, the actual error in my logic was totally unrelated to the fragment below. The problem was that the DQAttribute that should have matched below was inserted by another rule, but the insertion was done at a time when the checkViolations collection was still emtpy. And I had forgotten the modif

[rules-users] Testing for non-existance of an object in list

2013-08-03 Thread Joe Ammann
Hi all I'm still struggling with the handling of lists and membership in the LHS of rule. I'm trying to formulate a rule that only fires if a certain object is not yet a member of a list. Here's what I currently have (Drools 5.5.0 btw): rule "R2030: UpdateDQAttribute" dialect "mvel"

Re: [rules-users] Testing the count of a pattern binding variable

2013-02-19 Thread David R Robison
Yes, I was just wondering if I could use a pattern binding variable instead of a pattern. I guess I cannot. David David R Robison Open Roads Consulting, Inc. 103 Watson Road, Chesapeake, VA 23320 phone: (757) 546-3401 e-mail: drrobi...@openroadsconsulting.com web: http://openroadsconsulting.com b

Re: [rules-users] Testing the count of a pattern binding variable

2013-02-19 Thread Wolfgang Laun
There's a minor problem with the syntax On 19/02/2013, Stephen Masters wrote: > Assuming that you don't have an infinite variety of accumulations you're > trying to use, something I have done previously is to create DRL technical > rule to generate accumulated values, which the DSL then uses as >

Re: [rules-users] Testing the count of a pattern binding variable

2013-02-19 Thread Stephen Masters
Assuming that you don't have an infinite variety of accumulations you're trying to use, something I have done previously is to create DRL technical rule to generate accumulated values, which the DSL then uses as constraints. i.e. rule "Generate sensor counts" when $sensor : Sensor()

Re: [rules-users] Testing the count of a pattern binding variable

2013-02-18 Thread Wolfgang Laun
What (I think) you are trying to do is not possible. But I wouldn't say that it cannot be done using DSL. What sort of collect/accumulate do you need? -W On 18/02/2013, David R Robison wrote: > I am developing rules using DSL so, from what I understand, I cannot use > collect and accumulate in

[rules-users] Testing the count of a pattern binding variable

2013-02-18 Thread David R Robison
I am developing rules using DSL so, from what I understand, I cannot use collect and accumulate in some of my DSL definitions (especially when using clauses that begin with a hyphen). So what I want to do is to test the count of a pattern binding variable, such as when $sensors : Sensor()

Re: [rules-users] Testing for global variable

2012-02-14 Thread Chris Selwyn
I tried that but it seems that setting a global on a Stateless session simply sets a value in a Map without doing any validation, hence no Exception. What I am doing now is to set the value in the Stateless session. It seems that those variables are made available to the StatefulSession that sls

Re: [rules-users] Testing for global variable

2012-02-14 Thread Wolfgang Laun
But you can try{ ks.setGlobal(...) } catch( Exception e ){ } -W On 14/02/2012, Chris Selwyn wrote: > Is there a way to test for the existence of a global variable in a > StatelessKnowledgeSession before inserting a SetGlobal command into a > BatchExecutionCommand? > > I am trying to write a r

[rules-users] Testing for global variable

2012-02-14 Thread Chris Selwyn
Is there a way to test for the existence of a global variable in a StatelessKnowledgeSession before inserting a SetGlobal command into a BatchExecutionCommand? I am trying to write a rules executor class that may execute some rulesets that need a particular global variable and some that don't.

[rules-users] Testing rules created using fluent API

2010-12-30 Thread Dan Nathanson
Hi, I've written code that converts our company's internal model of a process flow to a Drools flow, using the fluent API. I can see in my debugger that I've created the correct structure (I think), but I'd like to write test cases that prove it. Is there a way to check the structure of the gene

[rules-users] Testing

2009-12-02 Thread chris richmond
Hello, My emails stopped getting through from my other emal address and as some other users had helped me discover, the filtering/spam or whatever has prevented me from asking questions in the forumn, so I am testing from another email. Thanks, Chris __

Re: [rules-users] Testing individual rules

2009-12-02 Thread Andrew Waterman
fire on fact B? > > You can even go down to the level of "did rule sequence A fire in > the right order?" assertions, but usually such tests are too > brittle, and miss the point of rules anyway. :) > > --- On Wed, 12/2/09, Asif Iqbal wrote: > >> From: Asi

Re: [rules-users] Testing individual rules

2009-12-02 Thread Greg Barton
gt; >   > > > > > > > > > > From: > rules-users-boun...@lists.jboss.org > [mailto:rules-users-boun...@lists.jboss.org] > On Behalf Of > Pegram, Macon > > Sent: 02 > December 2009 16:08 > > To: Rules > Users List > >

Re: [rules-users] Testing individual rules

2009-12-02 Thread Asif Iqbal
Thanks will look into it. From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Pegram, Macon Sent: 02 December 2009 16:08 To: Rules Users List Subject: Re: [rules-users] Testing individual rules Yes... We've u

Re: [rules-users] Testing individual rules

2009-12-02 Thread Pegram, Macon
sday, December 02, 2009 6:59 AM To: rules-users@lists.jboss.org Subject: [rules-users] Testing individual rules Hi, This is general question, is it possible to test individual rules in a rules file? And using what, I am familiar with JUnit, but have seen Fit being used

[rules-users] Testing individual rules

2009-12-02 Thread Asif Iqbal
Hi, This is general question, is it possible to test individual rules in a rules file? And using what, I am familiar with JUnit, but have seen Fit being used in examples. regards ___ rules-users mailing list rules-users@lists.jboss.org https://lists.j

[rules-users] Testing out Type Declarations in simple rule file causing exceptions

2009-03-15 Thread CK
Hi, I'm wondering if I am doing something wrong in my code: I create dummy type declarations to indicate presence of certain states (is there possibly a better way of doing this?): declare Domestic dummy : boolean end declare Multiple dummy : boolean end rule "..." when ...