This content has been marked as final. Show 1 reply
Simply call the jBPMContext.save(processInstance) operation before the close() method is invoked.
The logging for the process instance, including the subprocesses, will be stored in the log table.
For a task, you should do
JbpmContext context = ...; TaskInstance task = context.getTaskInstance(id); task.end(); context.save(task.getProcessInstance); context.close();
Or, better, use the jBPM command service. The commands automatically save the process instance (and closes the context):
TaskEndCommand command = new TaskEndCommand(taskId); commandService.execute(command);