Jose Pereira [
https://community.jboss.org/people/zeca9] created the discussion
"JBPM 5.4 - boundary signal event to abort reusable subprocess stopped in a Human
Task"
To view the discussion, visit:
https://community.jboss.org/message/827709#827709
--------------------------------------------------------------
Hi,
I'm new in Jbpm and beacuse of that, struggling to get something work :)
Let me explain:
I've a *main* process with a reusable subprocess that have a boundary signal event:
https://community.jboss.org/servlet/JiveServlet/showImage/2-827709-21129/...
https://community.jboss.org/servlet/JiveServlet/downloadImage/2-827709-21...
The reusable *subprocess* calls a process that have a script, a catch signal event and a
human task:
https://community.jboss.org/servlet/JiveServlet/showImage/2-827709-21130/...
https://community.jboss.org/servlet/JiveServlet/downloadImage/2-827709-21...
*CASE 1: Perfect!*
When I launch a instance by API:
+ProcessInstance processInstance = ksession.startProcess("Process_Name",
params);+
everything works like expected. The instance stops in signal event from the *subprocess*,
waiting to be fired.
Then I signal the boundary event from the *main* process;
+ksession.signalEvent(boundary_event, params, idMain);+
and again the result is the expected: The *subprocess* is aborted and *main* jumps to the
next task (Scrip Task 1).
*CASE 2: Error!*
I start the instance like in case 1, but this time I signal the event of the subprocess,
making this go foward to the human task TESTE_SUB.
Then I signal the boundary event from the *main* process (just like in case 1) and I get a
error!!!
Log:
+1 12/07 11:03:04,464[main] ERROR
drools.persistence.SingleSessionCommandService.rollbackTransaction - Could not commit
session+
+java.lang.RuntimeException: unable to execute Action: null+
+ at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.executeAction(ExtendedNodeInstanceImpl.java:74)+
+ at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerEvent(ExtendedNodeInstanceImpl.java:58)+
+ at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:46)+
+ at
org.jbpm.workflow.instance.node.EventNodeInstance.triggerCompleted(EventNodeInstance.java:66)+
+ at
org.jbpm.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:50)+
+ at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:356)+
+ at
org.drools.command.runtime.process.SignalEventCommand.execute(SignalEventCommand.java:95)+
+ 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.signalEvent(CommandBasedStatefulKnowledgeSession.java:210)+
+ at com.sample.ProcessTestes.sinalizarEvento(ProcessTestes.java:127)+
+ at com.sample.ProcessTestes.main(ProcessTestes.java:75)+
+Caused by: java.lang.NullPointerException+
+ at
org.jbpm.task.service.hornetq.HornetQTaskClientConnector.write(HornetQTaskClientConnector.java:194)+
+ at org.jbpm.task.service.TaskClient.getTaskByWorkItemId(TaskClient.java:473)+
+ at
org.jbpm.task.service.SyncTaskServiceWrapper.getTaskByWorkItemId(SyncTaskServiceWrapper.java:364)+
+ at
org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.abortWorkItem(GenericHTWorkItemHandler.java:203)+
+ at
org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalAbortWorkItem(JPAWorkItemManager.java:78)+
+ at
org.jbpm.workflow.instance.node.WorkItemNodeInstance.cancel(WorkItemNodeInstance.java:257)+
+ at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:257)+
+ at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:269)+
+ at
org.jbpm.workflow.instance.node.SubProcessNodeInstance.cancel(SubProcessNodeInstance.java:161)+
+ at
org.jbpm.process.instance.impl.CancelNodeInstanceAction.execute(CancelNodeInstanceAction.java:44)+
+ at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.executeAction(ExtendedNodeInstanceImpl.java:68)+
+ ... 11 more+
+Exception in thread "main" java.lang.RuntimeException: unable to execute
Action: null+
+ at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.executeAction(ExtendedNodeInstanceImpl.java:74)+
+ at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerEvent(ExtendedNodeInstanceImpl.java:58)+
+ at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:46)+
+ at
org.jbpm.workflow.instance.node.EventNodeInstance.triggerCompleted(EventNodeInstance.java:66)+
+ at
org.jbpm.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:50)+
+ at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:356)+
+ at
org.drools.command.runtime.process.SignalEventCommand.execute(SignalEventCommand.java:95)+
+ 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.signalEvent(CommandBasedStatefulKnowledgeSession.java:210)+
+ at com.sample.ProcessTestes.sinalizarEvento(ProcessTestes.java:127)+
+ at com.sample.ProcessTestes.main(ProcessTestes.java:75)+
+Caused by: java.lang.NullPointerException+
+ at
org.jbpm.task.service.hornetq.HornetQTaskClientConnector.write(HornetQTaskClientConnector.java:194)+
+ at org.jbpm.task.service.TaskClient.getTaskByWorkItemId(TaskClient.java:473)+
+ at
org.jbpm.task.service.SyncTaskServiceWrapper.getTaskByWorkItemId(SyncTaskServiceWrapper.java:364)+
+ at
org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.abortWorkItem(GenericHTWorkItemHandler.java:203)+
+ at
org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalAbortWorkItem(JPAWorkItemManager.java:78)+
+ at
org.jbpm.workflow.instance.node.WorkItemNodeInstance.cancel(WorkItemNodeInstance.java:257)+
+ at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:257)+
+ at
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:269)+
+ at
org.jbpm.workflow.instance.node.SubProcessNodeInstance.cancel(SubProcessNodeInstance.java:161)+
+ at
org.jbpm.process.instance.impl.CancelNodeInstanceAction.execute(CancelNodeInstanceAction.java:44)+
+ at
org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.executeAction(ExtendedNodeInstanceImpl.java:68)+
+ ... 11 more+
Seems that I can´t abort a reusable subprocess when this one is stopped in a human task.
Can anyone help me?
Thanks
+
+
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/827709#827709]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]