1 of 1 people found this helpful
Maybe you can try EventListener like this.
You could set a EventListener to handle processEndEvent and do what you want.
Thanks a bunch for following up.
I was asking a pretty basic question: how to close processes from an activity handler of another process. ExecutionService::endProcessInstance() all that I needed.
But I ran into another issue doing this call: the processes i need to close are collections of human tasks. All or any of the tasks may be pending at the moment of ending their processes. The call to endProcessInstance() fails with integrity constraint: can't delete "swimlane" records due to "task" child records. Looking into it now. If you have any ideas, would be grately appreciated
More update: I modifed jbpm.task.hbm.xml to inlcude
<set name="tasks" cascade="delete-orphan">
<key column="SWIMLANE_" />
and added corresponding Set<Task> tasks with a getter to the SwimlaneImpl.
That fixed the issue and seems to have no effect on opening and updating processes.
I am sorry that I cannot understand what you want to do. If you could provide a testcase to us, it will be appreciated. Thank you very much.