Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg

2013-05-02 Thread Davide Sottara
Ok... I think I know what is happening.. Background: each element in a package (rule, process, function, etc..) is mapped to the resource it was defined in. Resources can then be monitored for changes and the KB will be updated as appropriate. When the KnowledgeAgent (KA) is created with an initia

Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg

2013-05-02 Thread riri
Ok so I've added the listeners and I have run 2 scenarios: 1. I do not recreate the KA before I re-run a session, and all the info that I get even after having deleted a rule from the package is : // at the beginning [2013-05-02 23:23:32,031:info] ResourceChangeNotification scanner has started [2

Re: [rules-users] Is there a way to add a JAR to a knowledBuilder

2013-05-02 Thread Davide Sottara
What would be the exact use case for this? The FactType reflective API is used to access the classes declared in DRL and compiled on-the-fly at runtime. As long as the jar is on the classpath, you should be fine. Notice that guvnor is different, since you do have to deliver the jar there. -- Vi

Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg

2013-05-02 Thread Davide Sottara
My fault, I just realized the KA is not using log4j. To enable the logs, you should do: // enable scanner and notifier logs before starting them : SystemEventListenerFactory.setSystemEventListener(new PrintStreamSystemEventListener()); // enable agent event logs just after creating it : agent.add

Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg

2013-05-02 Thread riri
Thank you for the tips! I did change the scanning interval to 20s and I wait before restarting the session. I have also tried to compile the package manually in Guvnor after changing a rule but still no effect. The problem is that I use the embedded editor in my application for creating a rule and

Re: [rules-users] Using XMLGregorianCalendar for @timestamp metadata

2013-05-02 Thread Davide Sottara
Jaxb supports binding customizations and has plugin for code enhancement, I'm just not sure if you'd be able to inject them in the appropriate place. Unfortunately no, there's no way to add **methods** in a rule. There's something very experimental in the sense of interface injection and mixins, b

Re: [rules-users] Using XMLGregorianCalendar for @timestamp metadata

2013-05-02 Thread ScalaEnthusiast
That is possible with subclassing, as the class is being created by a jaxb conversion for a web service call. If I owned the class, it wouldn't be an issue - just trying to not change what we are provided by a third party. Is there a way to add an attribute in the rule itself and populate with a

Re: [rules-users] Drools Guvnor - Testing rules

2013-05-02 Thread Davide Sottara
Thanks for reporting, the ConditionalBranchDescr should be managed by verifier. I'll create a JIRA for this and make sure it's included in 5.6. On 05/02/2013 11:51 AM, rswanson wrote: > Using 5.5.0.Final, I just started trying to use the verifier and get a number > of these exceptions: > > org.d

Re: [rules-users] Drools Guvnor - Testing rules

2013-05-02 Thread rswanson
Using 5.5.0.Final, I just started trying to use the verifier and get a number of these exceptions: org.drools.verifier.visitor.UnknownDescriptionException: Descr ( class org.drools.lang.descr.ConditionalBranchDescr ) is unknown to drools verifier. at org.drools.verifier.visitor.RuleDescrVi

Re: [rules-users] Using XMLGregorianCalendar for @timestamp metadata

2013-05-02 Thread Davide Sottara
Your assumptions are correct, currently @timestamp looks for an attribute or a getter. Can you add a long-returning method to your class to perform the conversion? On 05/02/2013 11:27 AM, ScalaEnthusiast wrote: > I have an object that comes into a stream as an event and I want to use > @timestamp

[rules-users] Using XMLGregorianCalendar for @timestamp metadata

2013-05-02 Thread ScalaEnthusiast
I have an object that comes into a stream as an event and I want to use @timestamp to specify the event time from the object. Then field that has this information is an XMLGregorianCalendar called timeStamp. If I specify this attribute with @timestamp(timeStamp) I get and error saying that convers

Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg

2013-05-02 Thread Davide Sottara
Thanks, I'll try to reproduce it later. Just a couple of side notes.. Given that the rules fire correctly the first time, I would exclude that the wrong URL is used. The ChangeScanner has a polling interval of **60** seconds, so changes may not be immediate. You can configure that interval, though

Re: [rules-users] java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.AlphaNode$AlphaMemory

2013-05-02 Thread Davide Sottara
Could you post **at least** the unit test throwing the exception, the one that "enables" it and the code you are using to run them? This may be yet another blocker for 5.6, so I'd like to investigate it as soon as possible Thanks! Davide On 05/02/2013 07:20 AM, dcrissman wrote: > Yes, I am getting

Re: [rules-users] getWorkingMemoryEntryPoint returns null - two rules with same name

2013-05-02 Thread Davide Sottara
At least in latest versions, duplicate rules with the same name are reported as errors by the KnowledgeBuilder. I didn't check 5.3, so I wouldn't know for sure about that version. On 05/02/2013 07:03 AM, ScalaEnthusiast wrote: > All, > > I was getting a null returned when requesting an entrypoint

Re: [rules-users] Is there a way to add a JAR to a knowledBuilder

2013-05-02 Thread Charles Moulliard
I have created an example where I import model from a jar file (containing classes LoanApplication, Applicant, IncomeSource, ...) but get a NPE when I try to create a object from FactType. That means that packages has not be loaded correctly. Any idea is welcome https://gist.github.com/cmoulliard/

[rules-users] Is there a way to add a JAR to a knowledBuilder

2013-05-02 Thread Charles Moulliard
Hi, Is there a way to add a JAR to a knowledgeBuilder with a method like that ? kbuilder.add(ResourceFactory.newUrlResource("file:///model-1.0-SNAPSHOT.jar"),ResourceType.JAR); Regard, -- Charles Moulliard Apache Committer / Sr. Enterprise Architect (RedHat) Twitter : @cmoulliard | Blog : http

Re: [rules-users] java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.AlphaNode$AlphaMemory

2013-05-02 Thread dcrissman
Yes, I am getting this exception (sadly, not something that I am just worried about). I am checking for rule complication errors before running the rules, and no errors are being given. I am not dynamically adding or removing rules once I have my knowledge base setup, it does not change though th

[rules-users] getWorkingMemoryEntryPoint returns null - two rules with same name

2013-05-02 Thread ScalaEnthusiast
All, I was getting a null returned when requesting an entrypoint using getWorkingMemoryEntryPoint("myEntryPoint") in BRMS 5.3.1 (Drools 5.3). To be clear "myEntryPoint" is an entry point defined in my technical rule. What was causing my issue was that there were two rules of the same name (cut-n

[rules-users] 5.5.0-Final, persistence to MySQL

2013-05-02 Thread Vytautas Gimbutas
Hello, i'm having an issue with Drools 5.5.0-Final, stateful sessions and persistence to MySQL. I have successfully configured and everything seems to work fine (session is persisted & updated to database), however sometimes after i kill (not after each kill) and start again application I'm una

[rules-users] error while deploying drools guvnor 5.5 on was8

2013-05-02 Thread ashish6276
Hi i am deploying drools guvnor 5.5 on was8.0. deployement is successfull. But when i start the application i am getting following exception. Please suggest some way to come out. [5/2/13 15:27:45:601 IST] 0088 SystemErr R SLF4J: Found binding in [bundleresource://430.fwk105863925:1/org/

Re: [rules-users] Drools Guvnor - Testing rules

2013-05-02 Thread Toni Rikkola
Guvnor uses the Drools Verifier module for this. You can run the verifier in the QA Analysis section. Here is a list of features the Verifier covers https://community.jboss.org/wiki/DroolsVerifier It also has the features you listed. Verifier is not perfect, depends how you write your rules, bu

Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg

2013-05-02 Thread riri
As an addition to my post earlier, there is an error in the loggs regarding the change-set.xml: ERROR ExtensibleXmlParser:666 - (null: 6, 119): cvc-elt.1 : Declaration of element 'change-set' not found. My change-set.xml file is as follows: http://drools.org/drools-5.0/change-set";

Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg

2013-05-02 Thread riri
Here is the code I am using to create the knowledge base, knowledge agent and to retrieve the resources: public static KnowledgeBase createKnowledgeBase(List resources, EventProcessingOption eventProcessingOption) { KnowledgeBuilder builder = Know