You can restart a process instance that is in the finished, terminated,
failed, or compensated state.
Before you begin
The caller must be an administrator of the process instance or a business
process administrator.
Why and when to perform this task
Restarting a process instance is similar to starting a process instance
for the first time. However, when a process instance is restarted, the process
instance ID is known and the input message for the instance is available.
Steps for this task
- Get the process that you want to restart.
ProcessInstanceData processInstance =
process.getProcessInstance("CustomerOrder");
- Restart the process instance.
PIID piid = processInstance.getID();
process.restart( piid );
This action restarts the specified process
instance.