我是 BPM 新手,使用 JBPM5.4 安装程序。
下面是从 Guvnor 获取的我的 drl 源代码。当触发规则时出现错误。
rule "TestRule"
dialect "java"
when
exists (Person( name == "estaban" ))
then
Person.setName( "ESTABAN" );
end
堆栈跟踪:
Exception in thread "main" Exception executing consequence for rule "TestRule" in com.tcs: java.lang.NullPointerExceptio
n
at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.j
ava:39)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
at com.sample.ProcessMain.main(ProcessMain.java:41)
Caused by: java.lang.NullPointerException
at com.tcs.Rule_TestRule_063717b0a0b841d3ae5b0d9fa14879f8.defaultConsequence(Rule_TestRule_063717b0a0b841d3ae5b0d9fa148
79f8.java:7)
at com.tcs.Rule_TestRule_063717b0a0b841d3ae5b0d9fa14879f8DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at com.tcs.Rule_TestRule_063717b0a0b841d3ae5b0d9fa14879f8DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
... 6 more