Hi Guys,
I am having a problem using Drools 5.5.
Basically, I have a ksession in stream mode.
I have a rule with an event, like this
when
myfact: EventA( main > 21 ) over window:length (1)
myfact2 : EventA( main <= 21 , this before myfact ) over window:length (2)
I also use a KnowledgeAgent and apply a changeset.
If I declare this rule directly from the changeset, as a Classpath resource,
with resource type DRL, it seems to work fine (the kbase compiles!).
But If I have the rule in a guvnor package, and I put the PKG link in my
changeset, I am getting an error:
Caused by: java.lang.NullPointerException
at
org.drools.base.evaluators.BeforeEvaluatorDefinition$BeforeEvaluator.getInterval(BeforeEvaluatorDefinition.java:268)
[drools-core-5.5.0.Final.jar:5.5.0.Final]
at
org.drools.rule.constraint.EvaluatorConstraint.getInterval(EvaluatorConstraint.java:100)
[drools-core-5.5.0.Final.jar:5.5.0.Final]
at
org.drools.reteoo.builder.BuildUtils.gatherTemporalRelationships(BuildUtils.java:326)
[drools-core-5.5.0.Final.jar:5.5.0.Final]
at
org.drools.reteoo.builder.BuildUtils.calculateTemporalDistance(BuildUtils.java:292)
[drools-core-5.5.0.Final.jar:5.5.0.Final]
at
org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:119)
[drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:113)
[drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:445)
[drools-core-5.5.0.Final.jar:5.5.0.Final]
It seems that that getOperator() is null in this evaluation:
if ( this.getOperator().isNegated() ) {
I debugged a bit, and it seems the evaluator comes in serialized from
guvnor's package.But in case of getting directly the classpath resource, it
compiles the package and it gets the real operator ok (Operator = 'before')
Do you have any idea of why it could be happening? May I be doing something
wrong? Is this a bug in guvnor?
Thanks in advance!
Demian
--
View this message in context:
http://drools.46999.n3.nabble.com/Problem-with-PKG-from-guvnor-tp4025687....
Sent from the Drools: User forum mailing list archive at
Nabble.com.