Re: [rules-users] Using java enums in guvnor test scenarios (6.0.1Final)

2014-07-22 Thread Toni Rikkola
Hi, Tested this and looks like you found a bug. Made a ticket for it so we can get it fixed. https://bugzilla.redhat.com/show_bug.cgi?id=1121985 Thanks for reporting Toni Rikkola On ma, 2014-07-21 at 10:28 -0700, pacovalsera wrote: Hi all, I'm defining a test scenario within guvnor (now

Re: [rules-users] Using java enums in guvnor test scenarios (6.0.1Final)

2014-07-22 Thread pacovalsera
Hi Toni, thanks for your quick response. As a workaround I'm defining a getter/setter for the enum member based on a string arg. That is, / public String getEnumMemberStr() {return enumMember.name();} public void setEnumMemberStr(String enumMemberStr)

[rules-users] [drools-wb] how to move an asset to another package ?

2014-07-22 Thread jps
Hello, I'm in the process of refactoring the different packages in my project. How can I move an asset (a guided decision table in this case) from its current package to a new package ? It seems there's no button or action for that in drools-wb ? Regards. --jps -- View this message in

[rules-users] Drools Applications Google Group

2014-07-22 Thread Mark Proctor
A while back there was a discussion on the volume of posts and the range of post discussions. OptaPlanner already has it’s own google group, which has helped reduce the volume. There is still the discussion on whether to split Drools. My initial idea is to leave this list for installation,

[rules-users] how to count distinct nested property?

2014-07-22 Thread richardhands
Hi, I’m trying to wrap my head around how to use a combination of accumulate from and collect from to get a count of how many unique items there are of a nested child property and run the RHS of a rule if it’s 1 So I have Many of Object A Each one contains An object B An object C Object C

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

2014-07-22 Thread marianbuenosayres
I'm bumping this question for general interest on other possible solutions, and to give my two cents. The closest I was to getting this feature in Drools 6 from the public APIs, is to use a persistent session. Then, when I loaded an existing session, I would pass a newly created KieBase, like

Re: [rules-users] how to count distinct nested property?

2014-07-22 Thread Jeremy Ary
I wonder if something like this might do it? when $set : HashSet ( ) from accumulate ( ObjectA ( $myId : objectC.myId ), init ( HashSet uniqueIds = new HashSetString(); ), action ( uniqueIds.add($id); ),

Re: [rules-users] how to count distinct nested property?

2014-07-22 Thread Jeremy Ary
err, typo there, add() and remove() should be using $myId instead of $id On Tue, Jul 22, 2014 at 9:38 AM, Jeremy Ary jeremy@gmail.com wrote: I wonder if something like this might do it? when $set : HashSet ( ) from accumulate ( ObjectA ( $myId : objectC.myId ),

Re: [rules-users] how to count distinct nested property?

2014-07-22 Thread Jeremy Ary
My last comparison there may be problematic as well...too focused on the accumulate to see the obvious. I think that approach might still require an eval to check the size constraint on the list and we don't really want that. What you could do instead, however, is insert the hashset into the

Re: [rules-users] KieContainer#updateToVersion fails when both versions of a drl file contain an event type declaration for an existing class

2014-07-22 Thread mikedev9000
Mark, thank you for the response. I was able to reproduce this issue with 6.1CR1 and the latest code from the 6.1.x as of this morning. I created a bug ticket for this issue and a pull request containing the unit test I wrote. Ticket: https://issues.jboss.org/browse/DROOLS-560 Pull request:

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

2014-07-22 Thread Borris
I was experimenting with ways of avoiding having to put literal strings into my rules (it is very fragile and bugs can be silent for a long time). I tried declaring a global and then tried supplying it to a query. This generates a backtrace during the newKieSession. A simple example to provoke

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] Drools Applications Google Group

2014-07-22 Thread Borris
On 22/07/2014 14:27, Mark Proctor wrote: A while back there was a discussion on the volume of posts and the range of post discussions. OptaPlanner already has it’s own google group, which has helped reduce the volume. There is still the discussion on whether to split Drools. My initial

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] KieContainer#updateToVersion fails when both versions of a drl file contain an event type declaration for an existing class

2014-07-22 Thread Mario Fusco
Hi Mike, I merged your test case and fixed the bug with this commit https://github.com/droolsjbpm/drools/commit/283ba1d94 Thanks a lot for having reported this problem, Mario -- View this message in context:

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

2014-07-22 Thread Borris
Hi Davide, I've got a null pointer exception with defeasible. My test case is: package com.sample declare Fact fact: String @key end rule init when then System.out.println(inserting initial facts); insert( new Fact( one ) ); insert( new Fact( two ) );

Re: [rules-users] Drools Applications Google Group

2014-07-22 Thread Mark Proctor
I’m currently setting a google group, won’t touch nabble. It allows welcome messages, sticky nodes, and if necessary moderation. Mark On 22 Jul 2014, at 18:24, Wolfgang Laun wolfgang.l...@gmail.com wrote: As long as Nabble is kept out. Stackoverflow is, at present, quite reasonable, with a

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

2014-07-22 Thread Mark Proctor
Stack trace shows the error: org.drools.core.beliefsystem.defeasible.DefeasibleBeliefSet.removeUndefeated(DefeasibleBeliefSet.java:295) https://github.com/sotty/drools/blob/master/drools-core/src/main/java/org/drools/core/beliefsystem/defeasible/DefeasibleBeliefSet.java Maybe have a go fixing it

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

[rules-users] Including repository in a WAR file

2014-07-22 Thread ilguapo
I'm using Drools 5.3.0 I'd like to find out if the following scenario is possible: - Include the repository_export.zip file inside my application WAR file. This way, Guvnor won't be necessary. - Provide a special upload page just like Guvnor's Import/Export to upload a completely new