Hi list,
The attachment is a very simple test case to demonstrate an application
using Drools Persistence JPA (5.1.1).
Usage:
1. set up a mysql database called framework
2. set the user/password are root/root (or change the
bitronix-datasources.properties file)
3. run maven test
The core lines are as following:
StatefulKnowledgeSession ksession =
JPAKnowledgeService.newStatefulKnowledgeSession(kbase, conf, env);
ProcessInstance pi = ksession.startProcess("com.zyeeda.system.TestFlow");
pi.signalEvent("signal", "goon");
When executing the 3rd line, an exception occurred
java.lang.NullPointerException
at
org.drools.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:67)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.getWorkflowProcess(WorkflowProcessInstanceImpl.java:185)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:346)
at com.zyeeda.test.AppTest.testProcessPersistence(AppTest.java:84)
I've headed into the code and find that some working memory related to the
ProcessInstanceImpl is null.
(drools-core/src/main/java/org/drools/process/instance/impl/ProcessInstanceImpl.java)
But I cannot get why this does happen. Please give me some tips.
I tried to google some solutions, but find only this one (
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Events-No...),
but it seems that he solved this problem by using a custom command.
Thank you!
--
唐睿