Reputation: 825
I am using Camunda and I want to restart already completed process. I am doing that using the following logic:
ProcessEngines.getDefaultProcessEngine()
.getRuntimeService()
.restartProcessInstances(processInstance.getProcessDefinitionId())
.processInstanceIds(processInstanceId)
.startBeforeActivity(processInstance.getStartActivityId())
.initialSetOfVariables()
.execute();
And this works great but after it is restarted I am not able to get the process instance id of the newly started process since the execute method is of type void. Anyone know how I am able to get the process instance id of the new process?
Upvotes: 2
Views: 675
Reputation: 47
By the time you restart a task, the task ID is new and the processInstanceId will be new
Upvotes: 0