Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Michael Anstis
A time based eviction queue is simply a queue that evicts its content based upon time-based heuristic. So the WorkingMemoryEventListener would store facts inserted into the WorkingMemory in an internal queue and evict them from that queue based upon some time-based heuristic. You could use an Execu

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Wolfgang Laun
There isn't much support Drools provides for this. The listener tells you about a new Fact being inserted, and then - what? Unless you are satisfied with a constant expiry offset, or define expiry times by a Map,Long> or implement getExpiryOffset in all of your classes, you don't know *when* to ret

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Michael Anstis
Very true Wolfgang, and I agree your comments re: accessing meta data too. In this case if Events are raised in response to Facts and the events themselves expire after 5 mins; I'd assume a constant time expiration policy on the queue to be acceptable however this is based on assumption rather tha

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Ayush
Thanks for replies. Actually what I did now is I declared my fact into drl file and then I'd added an @expires to it. It works fine but now the problem is that for every fact inserted I'd also inserted an event for it. Now as the drl file can be updated by user so say he'd defined expiry time fo

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Ayush
Thanks. Actually I did it in different way what I did is I declared my fact into drl file as declare MyFact and then I'd added an @expires to it. It works fine but now the problem is that for every fact inserted I'd also inserted an event for it. Now as the drl file can be updated by user so say

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Wolfgang Laun
Now that I see this code I wonder why you don't simply promote MyFact to an event? But, given the current situation, which removes MyEvent facts after 1m, and assuming that you insert the MyEvent *before* its corresponding MyFact, you can rule "fact-without-event" when $f: MyFact($entity : en

[rules-users] Drools flow question on proper exception handling / use of faults

2010-11-12 Thread Liße , Jan
Hi, I have a process workflow where an exception might occur within one Action. I need to react on this exception in the workflow. That means I don't want to skip the entire processing I just want to react properly by setting an error variable and skip this specific item (my process iterates ov

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Ayush
oh yes Thanks this rule will solve my problem. I'm wondering is there any way I can actually verify the business logic of my rules. I'd read about drools-verifier but I've not found enough information for it to be used with drl. I want that in some way I can check the business logic from java cl

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Wolfgang Laun
You can use JUnit, create a session, insert facts, call fireXY(),... Asserting the correct result may be done by inspecting the WM or listening to events or whatever your app suggests. -W On 12 November 2010 11:45, Ayush wrote: > > oh yes Thanks this rule will solve my problem. > > I'm wonderin

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Wolfgang Laun
Just in case anybody wonders about the effort for building a mechanism for retracting facts based on fact attributes or other data, I outline the solution I have implemented. My class FactWiper implements WorkingMemoryEventListener and Runnable. - The implementation of objectInserted( ObjectIn

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

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 Edson Tirelli
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. Otherwise, Wolfgang's suggestion for the workaround should work as well. Edson 2010/11/12 : > Edson Ti

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

[rules-users] User Experience with multiple users in Guvnor

2010-11-12 Thread John Peterson
I have a question for users out there working with Guvnor. Do you have more than one user working on rules within the same package at the same time? How are you handling versioning and testing, especially if the changes are not going out at the same time? We've been experimenting with Guvnor (5.

[rules-users] 8Puzzle problem with Drools Planner

2010-11-12 Thread Anderson Rocha
Hi all, I am wondering if Drools Planner can handle the 8Puzzle problem. I once resolved it with the A* search. But I do not know these simulated annealing and tabu search that Drools Planner implements. So I am having a "Getting stuck in local optima" problem, and depending on the start sollution

[rules-users] Rules Flow Eclipse editor

2010-11-12 Thread Prafull Kumar
Hi All, I would like to know how we can modify the Rules flow eclipse editor look and feel and functionality. e.g. If we have a Embedded Sub-Process in the flow and reduce the size of it, the arrows are still displayed in the main canvas. Please see the attached snapshot for reference. How w

[rules-users] Rules Flow production level support

2010-11-12 Thread Prafull Kumar
Hi All, I would like to know the possible options of production level support for Drools Flow 5.1. Please share the links if support is available from JBoss or any 3rd party. Regards, Prafull ___ rules-users mailing list rules-users@lists.jbo