Re: [rules-users] Annotation @PropertyReactive not works

2014-08-09 Thread Davide Sottara
-08-08 15:26 GMT+02:00 Davide Sottara dso...@gmail.com mailto:dso...@gmail.com: If I remember correctly this is a known issue. Unfortunately drools 5.6 is final and can't be patched. Downloading the source drl rather than the compiled pkg could be a workaround

Re: [rules-users] Annotation @PropertyReactive not works

2014-08-08 Thread Davide Sottara
If I remember correctly this is a known issue. Unfortunately drools 5.6 is final and can't be patched. Downloading the source drl rather than the compiled pkg could be a workaround. Please let me know if it works Sent via the ASUS PadFone X, an ATT 4G LTE smartphone Original Message

Re: [rules-users] NPE in LeftTupleSetsImpl.removeUpdate

2014-07-30 Thread Davide Sottara
It has almost certainly been fixed in 6.1 Davide On 07/31/2014 03:40 AM, David Zeigler wrote: Hi, I'm using drools 6.0.1.Final. I received a NPE in the org.drools.core.common.LeftTupleSetsImpl.removeUpdate() method on line 172, which corresponds to this line for 6.0.1.Final:

Re: [rules-users] Are globals not permitted with queries?

2014-07-25 Thread Davide Sottara
a clever technique they've used in the past? Thanks Borris On 22/07/2014 17:16, Davide Sottara wrote: The case may not be supported, but even then, it should be reported as a compilation error, not as a NPE I'll investigate and report back later Thanks Davide On 07/22/2014 05:48 PM

Re: [rules-users] Defeasible: NPE: with multiple @Defeasible

2014-07-25 Thread Davide Sottara
Fixed, in PR status. It was indeed another bug. https://github.com/sotty/drools/commit/7941a0c8d7e66c6c7719c14ca58d798337d067d8 Thanks for reporting, we really appreciate the feedback Davide On 07/23/2014 10:58 PM, Borris wrote: On 22/07/2014 22:44, Mark Proctor wrote: Stack trace shows the

Re: [rules-users] [optaplanner] creating dynamic fact classes(planning entity and planning variables) in Optaplanner

2014-07-24 Thread Davide Sottara
Declared types support annotations. You'll have to import it package my.drl; import my.SomeAnnotation; declare Foo @SomeAnnotation bar : String end When the declare is processed, the class builder will try to resolve the annotation and, if found, will wire it to the class being generated.

Re: [rules-users] Dynamically loading rules in KieBase

2014-07-22 Thread Davide Sottara
You can add rules programmatically to an existing KieBase, but you have to: 1) add/replace the resource in the KieFileSystem 2) Cast the KieBuilder to InternalKieBuilder and use the incrementalBuild() method 3) Enjoy and report problems as this is a newer feature See the test suite here

Re: [rules-users] Are globals not permitted with queries?

2014-07-22 Thread Davide Sottara
The case may not be supported, but even then, it should be reported as a compilation error, not as a NPE I'll investigate and report back later Thanks Davide On 07/22/2014 05:48 PM, Borris wrote: I was experimenting with ways of avoiding having to put literal strings into my rules (it is very

Re: [rules-users] DROOLS-516 - Continued Memory Leak problem Drools 6.1.0.

2014-07-22 Thread Davide Sottara
Ack'd and queued. On 07/22/2014 11:46 PM, Kent Anderson wrote: It appears there is another condition where Drools holds onto memory indefinitely. (See https://issues.jboss.org/browse/DROOLS-516) Use case: We have a set of rules designed to detect a heartbeat, then report when/if the

Re: [rules-users] Question about getObjects() on workspace with defeasible belief system

2014-07-21 Thread Davide Sottara
Thanks for the feedback! The defeasible subsystem is still very experimental, and it's good to know that people are using it. This said, as for your question. It is possible, but takes a little effort since we don't have a public API for that. You can do: // get the handle for the object

Re: [rules-users] Question about getObjects() on workspace with defeasible belief system

2014-07-21 Thread Davide Sottara
for the response! A quick question on your example code before I try it: On 21/07/2014 21:24, Davide Sottara wrote: Notice that negatively asserted facts end up in a negative entry point, so you have to look them up explicitly: InternalFactHandle negHandle = (InternalFactHandle

Re: [rules-users] Problem when I cleaning the production memory.

2014-07-16 Thread Davide Sottara
Not checking for nulls is a debatable behavior :) In 5.6 you should be able to use the null safe accessor Business activity.!status == ... Which will be rewritten to do the check for you On Jul 16, 2014 4:33 AM, braveheart85 andrea.pacifico...@gmail.com wrote: Yesterday I tried version 5.6. I

Re: [rules-users] Problem when I cleaning the production memory.

2014-07-16 Thread Davide Sottara
Oops, it's !., not .! On Jul 16, 2014 5:39 AM, braveheart85 andrea.pacifico...@gmail.com wrote: I have tried your hint and i got: query dis $result : PersonData( businessActivity.!status == CLOSED) end [48,38]: [ERR 101] Line 48:38 no viable alternative at input '.' in query [0,0]: Parser

Re: [rules-users] Problem when I cleaning the production memory.

2014-07-15 Thread Davide Sottara
What are you trying to do exactly when you clear the knowledge base? If you need to replace all the rules, I'd just create a new KB altogether.. facts would be reasserted into the new rules anyway. If you need to update some of the rules, Drools 5.x had the KnowledgeAgent for this purpose. To be

Re: [rules-users] Problem when I cleaning the production memory.

2014-07-15 Thread Davide Sottara
Conceptually you are right, but in practice, when you add a rule/query to the KBase all the available facts are propagated through the newly built piece of RETE. Since you clear all the rules first (which has some cost) and then you build a new set of rules, the effect is very similar - only, the

Re: [rules-users] Problem when I cleaning the production memory.

2014-07-14 Thread Davide Sottara
Can you try 5.6 or a later version? That part of logic was improved in 5.6, and rewritten in 6.x Davide On 07/14/2014 04:54 PM, braveheart85 wrote: I forgot to say what version I'm using. The version of Drools is 5.5. -- View this message in context:

Re: [rules-users] Workaround: EventFactHandle retained in memory after FactCount reaches 0 for temporal-based rule

2014-07-14 Thread Davide Sottara
know what else we can do to facilitate fixing this issue. On Jul 14, 2014, at 2:09 PM, Davide Sottara dso...@gmail.com wrote: I'd need to check, but if you can put together the basics of the test case - the combination of rules and facts that causes the leak, we'll add the checks to ensure

Re: [rules-users] Workaround: EventFactHandle retained in memory after FactCount reaches 0 for temporal-based rule

2014-07-12 Thread Davide Sottara
Thanks for reporting, we'll investigate both this and 498 Davide On 07/11/2014 08:38 PM, Kent Anderson wrote: We have found a workaround that eliminates the leftover event (gone from Working Memory, but not from the JVM memory): The rule forget it ever happened (seen below) causes the

Re: [rules-users] unexpected/spurious ClassCastException

2014-07-09 Thread Davide Sottara
. I'll check the enabled attribute's behavior in 6.x Thanks Davide On 07/07/2014 06:11 PM, Borris wrote: On Monday 07/07/2014 23:26, Davide Sottara wrote: I'll try to reproduce the exception with the rule and the data model. Meanwhile, could you share a self-contained unit test that reproduces

Re: [rules-users] unexpected/spurious ClassCastException

2014-07-09 Thread Davide Sottara
, Borris wrote: On Wednesday 09/07/2014 14:41, Davide Sottara wrote: Sorry for not being able to get back to you again earlier. Yes, the rule / query you are showing makes sense - I would have asked you for something similar :) It is definitely a bug in the resolution of the class that defines

Re: [rules-users] unexpected/spurious ClassCastException

2014-07-07 Thread Davide Sottara
What is the relationship (extends/implements) between the classes/interfaces in your model - ContextFoodItem, FoodItem, ContextDiner, etc.. ? Could you also please specify the version of Drools you are using? Thanks! Davide On 07/07/2014 03:04 PM, Borris wrote: I am getting an unexpected cast

Re: [rules-users] unexpected/spurious ClassCastException

2014-07-07 Thread Davide Sottara
I'll try to reproduce the exception with the rule and the data model. Meanwhile, could you share a self-contained unit test that reproduces the problem? That would speed up the fix process Thanks! Davide On 07/07/2014 04:24 PM, Borris wrote: On Monday 07/07/2014 23:09, Borris wrote: Hi,

Re: [rules-users] Unable to resolve class error , drools 5.5 in concurrent execution. JSR94Support and Spring

2014-07-02 Thread Davide Sottara
5.5 was not thread-safe and some of these concurrency issues have been fixed in later versions. Could you try 5.6 or 6.x? On 07/02/2014 08:19 AM, maruthi_s wrote: Hi , We use Drools 5.5 and drool implementation is done through Spring JSR94Support API The Rule engine is called in concurrent

Re: [rules-users] accumulate function not registered

2014-06-18 Thread Davide Sottara
can you please open a jira ticket and possibly add a reproducer? It seems a serious regression, but it would have to be reproduced and fixed in the next few days for this to make it to the final release Thanks! Davide On 06/18/2014 03:26 PM, rogerL wrote: After upgrade to 6.1.0.CR1 rule

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Davide Sottara
The whole point of @propertyReactive is to avoid no-loop where possible. What Wolfgang was trying to say is that there is no need to use the eval: just write DvFacts0( condIsNUMERIC == null ) and the @propertyReactivity will work Davide On 06/11/2014 10:40 AM, brachi wrote: so, will no-loop

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Davide Sottara
Could you please show the conditions for which you need the eval? And which version are you using? As far as I know, eval is rewritten and removed internally in latest versions, so there shouldn't be a difference. On 06/11/2014 12:34 PM, brachi wrote: I need the eval. I have some rules that

Re: [rules-users] Adding eval on rule cause it to run in infinite loop

2014-06-11 Thread Davide Sottara
I think I know what is happening here. I assume your supportFT class is @propertyReactive. (btw, you should follow bean conventions and capitalize class names) Looking at Rule 1, you don't set the value directly, but you do it through a modify. Your rule 2, which checks for the value, uses the

Re: [rules-users] Are there second-rate fact types?

2014-06-10 Thread Davide Sottara
java.util.Collections (and descendants) are not @typesafe by default, I'll check the reason for that. More generally, if a fact is declared as not @typesafe, the runtime failure should be more graceful. Davide On 06/10/2014 01:26 PM, Wolfgang Laun wrote: Consider: class Foo { /*...*/ }

Re: [rules-users] Are there second-rate fact types?

2014-06-10 Thread Davide Sottara
In fact what we have now is *NOT* graceful I'll open a JIRA and try to provide a fix On 06/10/2014 01:52 PM, Wolfgang Laun wrote: On 10/06/2014, Davide Sottara dso...@gmail.com wrote: java.util.Collections (and descendants) are not @typesafe by default, I'll check the reason for that. OK

Re: [rules-users] Abstraction between rules and data model?

2014-06-02 Thread Davide Sottara
idea would be using some Java proxy voodoo-magic to wrap objects before they are inserted to the session, but my gut feeling is that it would be a way to debug hell... What do you think? Cheers, Peter 2014-05-27 19:42 GMT+02:00 Davide Sottara dso...@gmail.com mailto:dso...@gmail.com

Re: [rules-users] Not and forall operator behaviour

2014-05-29 Thread Davide Sottara
Both should fire when there is no message. This said, the two are not equivalent. The negation of Message( sent == true, status != INITIALIZED ) is: Message( sent == false *||* status == INITIALIZED ) That is, by deMorgan's laws, you need to negate the operators AND flip the and/or connectives.

Re: [rules-users] Abstraction between rules and data model?

2014-05-26 Thread Davide Sottara
We are working on the trait framework for cases like this. Essentially, it allows to use interfaces when writing rules AND to inject the interfaces dynamically at runtime, at the instance level. It relies on transparent proxies which wrap the data classes and implement the required interfaces. A

Re: [rules-users] java.lang.VerifyError org/drools/reteoo/ReteooRuleBase, method: setupRete signature: ()V

2014-05-26 Thread Davide Sottara
You mean that it used to work with your combination (jboss 4.2 + drools 5.4.0) and then it suddenly started throwing the exception? It seems strange.. do you have other applications deployed on the same instance of jboss? Maybe it's picking up a different version of the jars from somewhere else

Re: [rules-users] Cannot issue fireUntilHalt when using persisted session

2014-05-26 Thread Davide Sottara
Could you please show the code where you persist, reload and invoke fireUntilHalt() on the session? Ideally, could you open a jira ticket and post the code there? We'll take a look then. Thanks Davide On 05/22/2014 01:43 PM, rogerL wrote: Due to an issue with reloading persisted sessions that

Re: [rules-users] java.lang.VerifyError org/drools/reteoo/ReteooRuleBase, method: setupRete signature: ()V

2014-05-26 Thread Davide Sottara
but not with jboss. But using only that dependency fixed the issue. Do you know why? El may 26, 2014 11:02 AM, Davide Sottara dso...@gmail.com mailto:dso...@gmail.com escribió: You mean that it used to work with your combination (jboss 4.2 + drools 5.4.0) and then it suddenly started

Re: [rules-users] Is @PropertySpecific supported in Drools 5.6.0

2014-05-21 Thread Davide Sottara
In the end it was actually named @PropertyReactive On 05/21/2014 12:38 AM, RavishankarHassain wrote: I was looking fro some examples and document which explains on how to use the @Modifies annotations inside Facts(Java class) and it happened for me to see this doc

Re: [rules-users] Is property reactive bug in 5.5 fixed in 6.0

2014-05-04 Thread Davide Sottara
Bugs about @PR were reported and fixed in 5.6 and 6.x The fixes cover the bug described in the original thread. More issues related with @PR were fixed here: https://issues.jboss.org/browse/DROOLS-91?jql=project%20%3D%20DROOLS%20AND%20text%20~%20%22property%20reactive%22 If you have encountered

Re: [rules-users] Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple

2014-05-01 Thread Davide Sottara
This is unlikely a problem of the guided editor. Tuples are created when you run the rules in a session. We'd need to know which rules you're running and how you are inserting/retracting facts. Best Davide On 05/01/2014 01:57 PM, Jens Alejos at OAK CORP x4287 wrote: Hello, Our Guvnor

Re: [rules-users] Question about length windows

2014-05-01 Thread Davide Sottara
On 05/01/2014 09:46 PM, Wolfgang Laun wrote: A window:length is filled depending on the constraints but independent of how old the participating facts are. Currently only ALPHA constraints determine which facts are filtered by a length window. There is a JIRA to include beta constraints, but it

Re: [rules-users] java.lang.VerifyError: Bad type on operand stack

2014-04-15 Thread Davide Sottara
Looks like a bug.. can you post the DRL that generates this error? On 04/15/2014 09:12 AM, lvtenorio wrote: Hello, I am writing a rules file and unit tests to test each one of them. I am getting this error during the execution java.lang.VerifyError: Bad type on operand stack Exception

Re: [rules-users] KnowledgeAgentImpl registeredResourceMap memory issue

2014-04-14 Thread Davide Sottara
Ok, perfect. That internal interface was indeed changed. Please note that there is a potential problem with the implementation of the custom evaluators in 5.6. It has been fixed in 6.x, but it should probably be backported. Let me know if you have problems. Davide On 04/14/2014 08:29 AM, Cwen

Re: [rules-users] KnowledgeAgentImpl registeredResourceMap memory issue

2014-04-14 Thread Davide Sottara
Are you downloading a compiled PKG resource? You'd have to rebuild the PKG with 5.6, or use the source DRL.. On 04/14/2014 11:08 AM, Cwen wrote: Davide, I tried change our methods signature and run the application. Getting following stack trace when calling

Re: [rules-users] KnowledgeAgentImpl registeredResourceMap memory issue

2014-04-14 Thread Davide Sottara
MVEL glitch, try size() 0 On 04/14/2014 11:59 AM, Cwen wrote: Thank you Davide. That helped. I re-compiled the pkg and it got loaded successfully. However the run execution is throwing the following errors. I am looking into it. Not sure if that's something you have any insight. [Error:

Re: [rules-users] KnowledgeAgentImpl registeredResourceMap memory issue

2014-04-12 Thread Davide Sottara
Strange.. the APIs should have not changed between 5.5 and 5.6... what kind of compilation errors are you getting exactly? 1) The KA was partially rewritten because of a sub-project (drools-mas), so it was a combination of fixes and natural evolution You can try the tickets here, however:

Re: [rules-users] KnowledgeAgentImpl registeredResourceMap memory issue

2014-04-11 Thread Davide Sottara
Can you try 5.6.0.Final? Many issues regarding the KnowledgeAgent were fixed in that version Thanks Davide On 04/11/2014 08:45 PM, Cwen wrote: View this message in context: Re: KnowledgeAgentImpl registeredResourceMap

Re: [rules-users] Linkage Error In execute method

2014-04-05 Thread Davide Sottara
Can you upgrade to 5.6? Otherwise, you'll have to synchronize the methods int ClassLoader, the null check is not enough On 04/04/2014 09:16 PM, Karan Malhotra wrote: Hi All, We have recently upgraded our application from 5.1.0 to 5.4.0.Final. Everything worked well until this was

Re: [rules-users] Linkage Error In execute method

2014-04-05 Thread Davide Sottara
You should look at the 5.6 series, not the 6.0. Too many things have changed in the latter -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Linkage-Error-In-execute-method-tp4029123p4029130.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Memory leak due CompositeClassLoader

2014-04-05 Thread Davide Sottara
I think I'm starting to see the problem now. Where does this component live exactly, and how is that (and the KB) shared between your different webapps? -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Memory-leak-due-CompositeClassLoader-tp4029053p4029131.html

Re: [rules-users] Memory leak due CompositeClassLoader

2014-04-02 Thread Davide Sottara
You may have to dispose the sessions explicitly - or even the knowledgebase, using the internal method that was added as a temporary brute force patch to leaks in 5.6. The composite classloader was replaced in 6.x, so the newer versions should not have this kind of problems. Best Davide -- View

Re: [rules-users] Programmatically load rules classloader NullPointerException

2014-03-20 Thread Davide Sottara
Can you try 6.1.0-SNAPSHOT? I tried your code quickly and it seems to work Davide On 03/20/2014 03:25 PM, GrantWang wrote: Would someone please help with this? Did I do something wrong or is this a bug? I am using 6.0.1. Thanks! -- View this message in context:

Re: [rules-users] KnowledgeAgentImpl memory leak (5.5.0.Final)

2014-03-19 Thread Davide Sottara
Can you try version 5.6? On 03/19/2014 05:27 PM, alineasol wrote: Hello, We have a KnowledgeAgent with this configuration: * drools.resource.scanner.interval = 900 * drools.agent.monitorChangeSetEvents = true * drools.agent.scanResources = true *

Re: [rules-users] problem in sliding window

2014-03-18 Thread Davide Sottara
this it goes.. so when i create more than 4 files all at the same instant it falls under the same session and the sliding window works.. could this be the problem? On Mon, Mar 17, 2014 at 5:28 PM, Davide Sottara dso...@gmail.com mailto:dso...@gmail.com wrote: It is possible to declare sliding

Re: [rules-users] problem in sliding window

2014-03-17 Thread Davide Sottara
It is possible to declare sliding windows A possible problem (I didn't check the logic) is that you are not inserting the new Events you create. On 03/17/2014 12:13 PM, Sandhya Sree wrote: i found this type of declaration in a site and thought this is allowed.. also it doesnt throw any

Re: [rules-users] IllegalStateException:

2014-03-15 Thread Davide Sottara
in a current technology stack which i am using currently using strom - drools- saving back to database. Regards, Raj On 14 March 2014 19:59, Davide Sottara dso...@gmail.com mailto:dso...@gmail.com wrote: +1 Wolfgang :) Raj, we'd need

Re: [rules-users] IllegalStateException:

2014-03-14 Thread Davide Sottara
loosing the session since i am running is multi-threaded environment I see the following URL https://github.com/droolsjbpm/drools/pull/256/files Are these changed to main branch for version 6.0.1 Regards, Raj On 13 March 2014 23:46, Davide Sottara dso...@gmail.com mailto:dso...@gmail.com

Re: [rules-users] IllegalStateException:

2014-03-14 Thread Davide Sottara
are processing a set of 500 records, 250 are getting processed and 250 are getting failed Please suggest On 14 March 2014 15:53, Davide Sottara dso...@gmail.com wrote: Major bugs are usually backported.. are you sure that this fix addresses your problem? In general, if you don't provide

Re: [rules-users] IllegalStateException:

2014-03-13 Thread Davide Sottara
Are you using stateful or stateless sessions? Davide On 03/13/2014 05:01 PM, Raja Sekhar wrote: Hi Can someone help me with this. Regards Raj On 13 March 2014 14:05, Raja Sekhar raja.amir...@gmail.com mailto:raja.amir...@gmail.com wrote: Hi Iam processing dataset stream

Re: [rules-users] Question to Knowledge-Agent Behaviour

2014-03-13 Thread Davide Sottara
The ResourceChangeScanner will consider a resource modified if last modification last read. If your resource is a URL resource pointing to a file, the implementation (version 5.6, at least) will delegate to File.lastModified(). Make sure that whenever you (re)deploy your PKGs, the lastModified()

Re: [rules-users] looping in drools

2014-03-10 Thread Davide Sottara
The accumulates should not be in the then part of a rule (see my previous email). That rule gave you two lists, in the variables $plus and $mins, that you can use in the consequence. If you need to process each file separately, you may want to do something like this: rule new file when

Re: [rules-users] looping in drools

2014-03-10 Thread Davide Sottara
if 3 new files are added, 3 event objects must be created, and all three event objects must be added to ListEvent listOfEvents. Thanks. On Mon, Mar 10, 2014 at 11:48 PM, Davide Sottara dso...@gmail.com mailto:dso...@gmail.com wrote: The accumulates should not be in the then part

Re: [rules-users] 6.0.1.F EXTENDS in Guided Rule Editor does not work

2014-03-06 Thread Davide Sottara
If I remember correclty, extension only works within the same package On 03/06/2014 05:08 PM, SrjTx wrote: BaseRule DRL is package com.xyz.cep; import com.xyz.model.Flow; declare Flow @role(event) end rule BaseRule dialect java when then end

Re: [rules-users] Facing Problem with this exception

2014-03-05 Thread Davide Sottara
Similar bugs have been fixed over different versions, but it's very difficult to tell without some context. One would need at least the rule that causes the exception, but a minimal reproducer (rules + facts) would be ideal. On 03/05/2014 11:12 AM, Wolfgang Laun wrote: Could be a bug that has

Re: [rules-users] ArrayIndexOutOfBoundsException under high events load in drools CEP

2014-03-04 Thread Davide Sottara
Thanks, we'll look into this as soon as possible!! Davide On 03/04/2014 06:46 PM, ters wrote: Davide Sottara wrote However, the *deadlock* situation might have exposed a bug. Could you please submit a self-contained reproducer? Davide, I've posted on forum new topic with complete example

Re: [rules-users] Guvnor - Custom operator problem (Not finding it)

2014-03-04 Thread Davide Sottara
Evaluators are typically registered in the packagebuilder.conf file, or passed to the packagebuilder. Did you do something equivalent in guvnor? On 03/04/2014 05:46 PM, mattmadhavan wrote: Hello, I have written a custom operator called inlist and it works great in 5.4.0 (not in 5.6.0). When

Re: [rules-users] Simple aggregation problem

2014-03-03 Thread Davide Sottara
Raja, it is not clear what you are trying to achieve. The rule might be well written or not, we don't know your requirements. If id is what it should be - an identifier - your accumulate constraint would match a single object for each Product (the original product itself), which looks suspicious.

Re: [rules-users] Simple aggregation problem

2014-03-03 Thread Davide Sottara
from product group by hild so i will get if the data is hlid t1 110 110 2 10 2 10 the result would be hiid t1 1 20 2 20 Hope you understand what i am trying to do here Regards, Raja Regards, Raja On 3 March 2014 17:05, Davide Sottara dso...@gmail.com

Re: [rules-users] problem with drools

2014-02-28 Thread Davide Sottara
There are a few errors in the rules 1) not FileData( fileOld == fileNew ) will fire either 1) when there is a FileData with different lists OR 2) when there is no FileData at all in the workingMemory 2) the rule should not compile, unless fileOld and fileNew are STATIC fields of the class

Re: [rules-users] NullPointerException when calling Scan manually

2014-02-27 Thread Davide Sottara
Could you please share the unit test? Thanks Davide On 02/27/2014 11:42 AM, Brecht De Rooms wrote: Dear Drools users, I just merged all my code to Drools 6.0.1 and I am happy to see that it is more stable. Several issues I had with 5.6.x do not present themselves in 6.0.1. I am still

Re: [rules-users] Nested negation constraints behavior change from Drools 5.x to 6.x

2014-02-27 Thread Davide Sottara
We could reproduce the issue, it's now in a unit test: https://github.com/droolsjbpm/drools/pull/317/files Thanks for reporting this!! Davide On 02/28/2014 12:44 AM, mikerod wrote: I made a basic jar that only depends on Drools. All the rules do is output to standard out to demonstrate. This

Re: [rules-users] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-26 Thread Davide Sottara
I think I see the problem - though I haven't been able to test it with guvnor. Property Reactivity is resolved at compile time, when the package is built. When you load the DRL, you set PropertyReactive.ALWAYS in the (local) KnowledgeBuilder, so it will consider all classes as PR. However,

Re: [rules-users] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-26 Thread Davide Sottara
ProperReactive to the classes(in the sample project). Davide Sottara wrote I think I see the problem - though I haven't been able to test it with guvnor. Property Reactivity is resolved at compile time, when the package is built. When you load the DRL, you set PropertyReactive.ALWAYS in the (local

Re: [rules-users] What is the 5.6_dynamic branch?

2014-02-26 Thread Davide Sottara
5.6.x is the master of the 5.x series.. 5_6 dynamic is a temporary branch, created for development or test purposes, which has never been deleted On 02/26/2014 09:59 PM, dunnlow wrote: What is the difference between the 5.6.x and 5.6_dynamic branches in github? Thanks, -J -- View this

Re: [rules-users] Source from Snapshot in Guvnor 5.6

2014-02-26 Thread Davide Sottara
Yes, instead of the URL http:// ... /packages/ [my pack ] / binary use http:// ... /packages/ [my pack ] / source On 02/26/2014 10:24 PM, gboro54 wrote: Is there a way to download the drl of a snapshot? I know you can see the rules in the Guvnor(uneditable of course) but is there a way to

Re: [rules-users] Drools error log msg?

2014-02-25 Thread Davide Sottara
You likely have configured a DebugAgendaEventListener, which logs agenda events (rules activated, fired, etc..) on the standard error rather than the standard output. If you want a different behavior, remove the listener and implement one of your own. These are not errors anyway. Davide On

Re: [rules-users] Drools error log msg?

2014-02-25 Thread Davide Sottara
Davide Sottara dso...@gmail.com mailto:dso...@gmail.com: You likely have configured a DebugAgendaEventListener, which logs agenda events (rules activated, fired, etc..) on the standard error rather than the standard output. If you want a different behavior

Re: [rules-users] ArrayIndexOutOfBoundsException under high events load in drools CEP

2014-02-25 Thread Davide Sottara
Persisting sessions manually, especially out of synchronization and transactions, is not recommended. As previously suggested by Mario, could you try the JPA Persistent Sessions? However, the *deadlock* situation might have exposed a bug. Could you please submit a self-contained reproducer?

Re: [rules-users] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-25 Thread Davide Sottara
Interesting.. this may be a bug in the serialization process, and it may affect 6.x too Could you please check it with a package that contains a single rule using a single @propertyReactive class? On 02/25/2014 09:25 PM, gboro54 wrote: Also note we are using property reactive listener always.

Re: [rules-users] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-25 Thread Davide Sottara
Thanks! I'll get back to you tomorrow with the results On 02/25/2014 11:53 PM, gboro54 wrote: test-drools.zip http://drools.46999.n3.nabble.com/file/n4028329/test-drools.zip Here is a sample project which shows the issue. You can build the project as the fact model and upload the drl into

Re: [rules-users] in syntax breaking the Rete Tree

2014-02-20 Thread Davide Sottara
Please open a JIRA ticket, this is the way bugs are reported to the development team. https://issues.jboss.org/browse/DROOLS Davide On 02/20/2014 03:38 PM, droolster wrote: @laune, any update? Should I post to Stackoverflow as you are active there. Is this forum dead? -- View this

Re: [rules-users] packageBuilder.getPackage() returns null

2014-02-17 Thread Davide Sottara
Could you provide a full reproducer: rules, java snippet and stack trace of your exceptions? As a side note, is the path correct? dymanic looks like a typo.. Thanks Davide On 02/17/2014 09:34 AM, Raja Sekhar wrote: Hi i am trying to use drools template String drl =

Re: [rules-users] java.lang.NullPointerException when using a custom operator

2014-02-17 Thread Davide Sottara
Unfortunately I am not completely surprised... ironically, that function signature was changed at some point to simplify the code and make it more robust internally. The change, however, broke the backwards compatibility with existing custom implementations (something the users can fix) and the

Re: [rules-users] Custom Operator - 5.4.0 works but nor not in 5.6.0.

2014-02-17 Thread Davide Sottara
Matt, I had answered another thread directly on the forum, I'm not sure that it made it to the user list. This was my answer: Unfortunately I am not completely surprised... ironically, that function signature was changed at some point to simplify the code and make

Re: [rules-users] java.lang.NullPointerException when using a custom operator

2014-02-14 Thread Davide Sottara
Could you please show the stack trace of the exception and the rule that causes it? Thanks Davide On 02/14/2014 02:38 AM, mattmadhavan wrote: Hello, I am having a hard time with a custom operator. It works great in 5.2 but not in 5.6. Do you mind sharing your email ample for 5.6 please? I

Re: [rules-users] ArrayIndexOutOfBoundsException under high events load in drools CEP

2014-02-12 Thread Davide Sottara
I can see a few independent issues here. Drools 5.x was not designed to be thread-safe in general: there are some known critical races that may arise when multiple threads are inserting facts in parallel. Many have been patched in 5.6, but the real solution to the problem will be introduced in the

Re: [rules-users] Drools : 2 identical calls to the same knowledgeBase don't give the same result… why?

2014-02-10 Thread Davide Sottara
It is a bug, I'd say related to constraint jitting.. It seems to work with 5.6.0.Final, could you please try that version? Thanks Davide On 02/10/2014 06:06 PM, antoine wrote: Hello, I've faced some weird result using Drools 5.5.0.Final, and I would like to know if I am doing something wrong

Re: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator

2014-02-03 Thread Davide Sottara
as reported by abr. I work with abr on the project :) As he could not reproduce the bug, I just removed lines of code as much as possible to keep only the essentials. Here is a unit test: Drools-after.zip http://drools.46999.n3.nabble.com/file/n4027676/Drools-after.zip Davide Sottara

Re: [rules-users] Incorrect resolution of global symbols in LHS rule constraint (Java dialect)

2014-01-30 Thread Davide Sottara
Thanks, today we have actually identified the real cause of the error and we are already working to get it fixed. I wonder if a cast would also work : MyType( (Boolean) global_invoke( this ) ) Davide On 01/30/2014 10:03 PM, mikerod wrote: Thank you for your reply. That was helpful. I did

Re: [rules-users] Null Pointer Exception with 10K+ kBase objects

2014-01-28 Thread Davide Sottara
Could you post the full test case (rules + java)? Thanks Davide On 01/28/2014 05:10 PM, jhusby wrote: I'm trying to stress-test Drools to see what its limits are, and I stumbled across a NPE when I have a large amount of facts in a stateful knowledgebase: java.lang.NullPointerException

Re: [rules-users] java dialect and declared types

2014-01-23 Thread Davide Sottara
Declared types have public accessors as usual. This seems a minor bug in the expression analysis. Can you try getRaw().complicated() and / or raw.complicated and report what happens? Thanks Davide On 01/23/2014 06:40 AM, pmander wrote: If I declare a type in a drl and reference the

Re: [rules-users] java dialect and declared types

2014-01-23 Thread Davide Sottara
In that case I'm almost sure that the whole constraint has to be treated as a java expression. So yes, you will probably need getRaw().complicated( ... ) On 01/23/2014 08:06 AM, pmander wrote: will do, although complicated() has parameters and so I think I'll only able to try

Re: [rules-users] java dialect and declared types

2014-01-23 Thread Davide Sottara
Yes, if you use the java dialect, the whole RHS is parsed as a java block with some minor syntactic sugar (e.g. insert). On 01/23/2014 08:46 AM, pmander wrote: Davide Sottara wrote Declared types have public accessors as usual. This seems a minor bug in the expression analysis. Can you try

Re: [rules-users] Dynamic rules in Drools 6

2014-01-23 Thread Davide Sottara
There may be some misunderstanding here.. you can indeed rebuild the jar, but there is also a programmatic way to add (DRL) resources to an in-memory FS and update the KBs/KSs on the fly. See the examples in IncrementalCompilationTests Davide On 01/23/2014 10:11 AM, Mark Proctor wrote: On 23 Jan

Re: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ??

2014-01-22 Thread Davide Sottara
I'd say it's a bug... maybe indexing is involved? Replacing ruleA's LHS with $p: Parent( $a2 : attribute2 != null) ?getChildWithName($a2 , n1, $child;) makes it work as expected. I will investigate further. Davide On 01/22/2014 02:22 PM, Esteban Aliverti wrote: Hi guys, I was writing

Re: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ??

2014-01-22 Thread Davide Sottara
Indeed, the use case can be simplified further: package org.drools.test.bc; declare Parent attribute2 : String end declare Child parentId : String end query getChildWithName( String $parentId, Child $child ) $child:= Child( parentId == $parentId ) end rule Insert Children when

Re: [rules-users] Inconsistent output when @PropertyReactive is used

2014-01-15 Thread Davide Sottara
Actually (and arguably) I think that the behavior is consistent. In the first case, you insert a MyClass instance: base is eligible for activation, and so is rule 1. When rule 1 fires, it inserts a String which continues the previous propagation through rule 2. At this point, value is still !=

Re: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator

2014-01-13 Thread Davide Sottara
under drools 5.5.0.Final. Caused by: java.lang.NullPointerException at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:347) at org.drools.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:99) Davide Sottara wrote I tried

Re: [rules-users] forall is satisfied when there is nothing?

2014-01-08 Thread Davide Sottara
of vacuous implications : if donkeys could fly then (anything you want here) these are trivially true, too Davide On 01/08/2014 09:28 AM, Wolfgang Laun wrote: On 08/01/2014, Davide Sottara dso...@gmail.com wrote: Indeed it is true by convention, see also http://en.wikipedia.org/wiki

Re: [rules-users] forall is satisfied when there is nothing?

2014-01-08 Thread Davide Sottara
that it would be appropriate to change it. Davide On 01/08/2014 12:32 PM, Sonata wrote: laune wrote On 08/01/2014, Davide Sottara lt; dsotty@ gt; wrote: Indeed it is true by convention, see also http://en.wikipedia.org/wiki/Universal_quantification The only other alternative is to deprecate

Re: [rules-users] forall is satisfied when there is nothing?

2014-01-08 Thread Davide Sottara
The all and some combination is actually quite popular and might be implemented at some point. By no means it is the only possibility to enhance the expressivity of the language: http://plato.stanford.edu/entries/generalized-quantifiers/ On 01/08/2014 01:50 PM, Sonata wrote: Davide Sottara

Re: [rules-users] forall is satisfied when there is nothing?

2014-01-07 Thread Davide Sottara
First order logic does permit empty domains, and the universal quantifier evaluates to true in that case. Davide On 01/07/2014 11:11 AM, Wolfgang Laun wrote: It is true that first-order logic usually assumes that the domain of a formula be a nonempty set. As so often, things aren't quite so

  1   2   3   4   5   >