Re: [rules-users] Adding change/event listener to package

2012-03-01 Thread Wolfgang Laun
2012/3/2 Jian Feng Ng > I tried but it doesn't seem to work. I am using UrlResource for the > KnowledgeAgent. > > kagent.getKnowledgeBase().addEventListener(new foo()); > ResourceFactory.getResourceChangeNotifierService().start(); > ResourceFactory.getResourceChangeScannerService().start(); > > B

Re: [rules-users] Adding change/event listener to package

2012-03-01 Thread Jian Feng Ng
I tried but it doesn't seem to work. I am using UrlResource for the KnowledgeAgent.kagent.getKnowledgeBase().addEventListener(new foo());ResourceFactory.getResourceChangeNotifierService().start();ResourceFactory.getResourceChangeScannerService().start();But when the package is rescan, foo seems to

Re: [rules-users] How to make the working memory "clean"?

2012-03-01 Thread shawn
Thanks a lot. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-make-the-working-memory-clean-tp3790730p3791945.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@li

Re: [rules-users] How to make the working memory "clean"?

2012-03-01 Thread Wolfgang Laun
On 1 March 2012 23:10, shawn wrote: > Thank you very much~ > 1- You don't "retract", you can set it to null, same way as set to an > object. > Is it in java or in drool? ...? It's a Java object, made visible to DRL code. > If I understand correct, global variable is not > really inserted into

Re: [rules-users] How to make the working memory "clean"?

2012-03-01 Thread shawn
Thank you very much~ 1- You don't "retract", you can set it to null, same way as set to an object. Is it in java or in drool? If I understand correct, global variable is not really inserted into the working memory,right? Global just ensure drool can see the variable? 2-Several ways, simple is to us

Re: [rules-users] Variable length sliding windows?

2012-03-01 Thread Wolfgang Laun
Don't you fret because this isn't available. It's not difficult to collect facts over a variable interval, provided the timestamp is a regular property. An auxiliary fact defines the window's boundaries, and then you use ops like <= to select the facts. -W On 1 March 2012 17:25, Lauer, Will C wro

Re: [rules-users] How to make the working memory "clean"?

2012-03-01 Thread Wolfgang Laun
On 1 March 2012 16:21, shawn wrote: > I don't understand the garbage collection mechanism in drool, though I have > read the expert documentation. > There is no specific "garbage collection" by Drools - Java's GC does the trick. > 1 - how to retract a global variable in drool? > You don't "ret

Re: [rules-users] Getting java.lang.ClassCastException: - using Drools 5.3

2012-03-01 Thread kashif10
Thanks, Yes I tried & it's working fine on our server running Drool. 5.1. -- View this message in context: http://drools.46999.n3.nabble.com/Getting-java-lang-ClassCastException-using-Drools-5-3-tp3785966p3791434.html Sent from the Drools: User forum mailing list archive at Nabble.com. _

Re: [rules-users] Variable length sliding windows?

2012-03-01 Thread Edson Tirelli
Nope, only constants. Edson On Thu, Mar 1, 2012 at 11:25 AM, Lauer, Will C wrote: > I'm evaluating the use of Drools Fusion for a new project and have a > question about sliding windows that wasn't clear from the documentation. > Does the time specification in a sliding window need to be

[rules-users] Variable length sliding windows?

2012-03-01 Thread Lauer, Will C
I'm evaluating the use of Drools Fusion for a new project and have a question about sliding windows that wasn't clear from the documentation. Does the time specification in a sliding window need to be hardcoded in the rule, or can it be derived from something else? Basically, I'm wondering wheth

Re: [rules-users] KnowledgeAgent Changeset problems

2012-03-01 Thread Herman Post
There is the use case where the changeset.xml is read from Guvnor - that is what we are trying to do, and we don't have the option to specify where the schema lives. Perhaps schema validation should be false by default instead of true. Herm From: rules-users-boun...@lists.jboss.org [mailto

[rules-users] How to make the working memory "clean"?

2012-03-01 Thread shawn
I don't understand the garbage collection mechanism in drool, though I have read the expert documentation. 1 - how to retract a global variable in drool? 2 - how to retract all the facts that have been inserted into the working memory? If I use halt(), does it retract all facts in the working memor

Re: [rules-users] Build a Graphical Adventure Game in 20 minutes using JBoss Drools : All Hale the Wumpus

2012-03-01 Thread Mark Proctor
For this wanting to try this now, you can use the latest snapshot build from hudson: https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/drools-distribution/target/ I just put in some minor cleanups. I'd be interested to see what solutions people come up to solve this automa

Re: [rules-users] traits - don more than 3 pojos, got IllegalArgumentException

2012-03-01 Thread Michal Bali
Hi Davide, thanks for looking into this. Message is a class defined outside of the DRL, its source is below. NiceMessage is defined only inside the DRL. public class Message { public static final int HELLO = 0; public static final int GOODBYE = 1; private String message; private i

[rules-users] Guvnor Problem

2012-03-01 Thread arup
Hi all, I have deployed guvnor 5.1 in WAS 6.1. i get no errors while deploying. the guvnor link is working fine. but after uploading any pojo model when i'm trying to validate it, its saying that it cannot find the Class inside the package. but if i download the model from the guvnor, i'm getting

Re: [rules-users] traits - don more than 3 pojos, got IllegalArgumentException

2012-03-01 Thread Davide Sottara
This is odd... I tried to reproduce your issue but I didn't get any exception. Trying to react to any "NiceMessage" also produces the expected results... Now, I see that you do Message.setMessage(), so I assume that Message and NiceMessage are classes defined outside the DRL.. Could you send them s

Re: [rules-users] Drool Function error

2012-03-01 Thread shawn
Thank you~ -- View this message in context: http://drools.46999.n3.nabble.com/Drool-Function-error-tp3788965p3789874.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https

Re: [rules-users] Adding change/event listener to package

2012-03-01 Thread Wolfgang Laun
As with all Listeners in Java, you write a class implementing the methods defined by the interface. The parameter types tell you about what is passed to the respective call. class Foo implements KnowledgeBaseEventListener { public void afterRuleAdded(AfterRuleAddedEvent event){ if( "Wa

Re: [rules-users] Deployment Problem

2012-03-01 Thread arup
Solved the above problems. but getting something new. The errors are as follow: Could not instantiate Seam component: repositoryConfiguration org.apache.xalan.processor.TransformerFactoryImpl incompatible with javax.xml.transform.TransformerFactory java.lang.VerifyError: class loading constraint

Re: [rules-users] Adding change/event listener to package

2012-03-01 Thread Jian Feng Ng
I saw many interfaces, but the problem is I do not know how to 'use' them. Is there a tutorial or example codes somewhere?-rules-users-boun...@lists.jboss.org wrote: -To: Rules Users List From: Wolfgang Laun Sent by: rules-users-boun...@lists.jboss.orgDate: 03/01/2012 04:38PMSubject: Re: [r

Re: [rules-users] Adding change/event listener to package

2012-03-01 Thread Jervis Liu
Another approach is to subscribe to the package version feed, your application will get notified when there is a change in the package. Check this for details: https://community.jboss.org/wiki/PublishDroolsartifactsfromaproductionenvironment Cheers, Jervis On 2012/3/1 16:12, Jian Feng Ng wrote

Re: [rules-users] Adding change/event listener to package

2012-03-01 Thread Wolfgang Laun
See the javadoc on a lot of interfaces in org.drools.event.knowledgebase. The expert manual has a section on the "Event Model" showing how to attach a listener to the knowledge session (not a package). -W 2012/3/1 Jian Feng Ng > I wish to add a listener to a package, so that my application can

[rules-users] Adding change/event listener to package

2012-03-01 Thread Jian Feng Ng
I wish to add a listener to a package, so that my application can do something else when there is any creation or deletion of rules in the package. May I know how can I do this?___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.o

Re: [rules-users] Trivial bug in Planner 5.4.Beta1 : misleading error message when the wrong entity was annotated with @PlanningEntityCollectionProperty

2012-03-01 Thread Geoffrey De Smet
Thanks for reporting, I 'll fix it tomorrow probably https://issues.jboss.org/browse/JBRULES-3406 Op 01-03-12 07:26, aitchnyu schreef: > I accidently denoted the wrong class with the annotator > @PlanningEntityCollectionProperty ; a class which was NOT a planning entity. > Apparently, Drools Pl