Ok, I still don't understand why my new rule is not taken in account...
So, I came back to my previous code and I realize that I have the expected
results anyway.
What I'm doing is:
1- FireAllRules (mandatory call to not have the NullPointerException)
2- Add a new rule
3- FireAllRules again
As the
I tried with your code, there is no error but my new rule is not taken in
account
I surely missed something and I'm looking at it.
Thanks for your reply.
--
View this message in context:
http://drools.46999.n3.nabble.com/NullPointerException-at-org-drools-compiler-kie-builder-impl-KieContainer
I am doing something similar, and other than a memory leak (which I
have managed to track down and submit a patch for) it works pretty
well...
Try this... (Note that it would possibly be better to build a new
ReleaseId every time, but more complicated)
It has some code to clean up in case of errors
I already tried with a KnowledgeBase as your link suggest and it works well.
But as the KnowledgeBase is deprecated, I would like to use the new way
implemented in Drools 6.
I'm still searching and if I can't find anything, I will submit this issue
to Jira.
Thanks
--
View this message in contex
We have a number of add/remove rule tests, could you reproduce your problem,
using the same classes and format as outlined in this test class. Ideally
adding your reproducer as a single failing test method:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/
Hello,
I'm trying to add a new rule on the fly like here:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L158
Here is the method to add a rule, once the KieSession is created and
configured:
publ