J Xmith [
https://community.jboss.org/people/xmithj] created the discussion
"jbpm 5.4.0 - NullPointerException completing workItem when using Spring local
transactions and shared entity manager."
To view the discussion, visit:
https://community.jboss.org/message/789975#789975
--------------------------------------------------------------
I decided to give it a try to Spring local transactions and shared entity manager, so I
changed my configuration as per user guide v5.4.
I tested with a fairly simple business process with an asynchronous workItem that get
completed after certain amount of time by a different thread.
Everything went well until the scheduled timer tried to complete the workItem by calling:
ksession.getWorkItemManager().completeWorkItem(workItemId, resultMap);
By executing this line, I am getting this exception:
2013-01-10 15:13:46,234 ERROR [Timer-0] SingleSessionCommandService
M[rollbackTransaction] --> Could not commit session
java.lang.NullPointerException
at
org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:306)
at
org.jbpm.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:285)
at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:342)
at
org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:121)
at
org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:69)
at
org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:32)
at
org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at
org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)
at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
The passed workItemId is correct (the expected one).
The same test runs successfully when configuring for JTA transaction management. Should I
create a Jira issue for this?
Regards,
John
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/789975#789975]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]