How to revive a process that is completed?

Consider a scenario there is a process with nodes A, B, C, and D. The process has already been completed, but the approver for node C has left the company (or been transferred to another department). At this point, the process is no longer valid and requires re-approval. However, there is no need for the approvers of nodes A and B to review again. Therefore, the goal is to revive the process and resume it specifically at node C.

I’m not sure if the revive functionality can be achieved, so I tried creating a new process instance instead. I transferred all variables from the original process instance to the new one and called the following method:

runtimeService.createChangeActivityStateBuilder()
    .processInstanceId(newProcessId)
    .moveActivityIdTo(currentActivityId, targetActivityId)
    .changeState();

Although this created an execution instance, its active value is 0 (meaning inactive), and there’s no task data in the act_ru_task table.

Hey @cglin7,

I am not sure that I am following. If the process is completed then how come you need a re-approval? This to me sounds like you need to model your process in such a way that when you start it you have conditions which steps need to be executed.

Cheers,
Filip

Thanks for replying @filiphr.

Let me give you an example. Suppose there’s an expense reimbursement process with a long approval chain involving 7 to 8 people. The final approver is usually the department head. However, if the department head gets transferred, even after the entire process is completed, the finance department will still verify the validity of the process when actually reimbursing the expenses. If they find that the department head has changed, they will require the new head to re-approve at that specific node.

While it’s possible to initiate a completely new approval process, doing so would require the previous 6 to 7 approvers to go through the entire process again, which we consider unnecessary since the key approval for this reimbursement process primarily depends on the final decision of the department head.

This type of business scenario might be uncommon, but it does exist in our company. Therefore, we’re exploring potential solutions to address this issue.

One practical way to handle this scenario—without trying to “revive” a completed instance—is to model a dedicated re-approval entry point in the process.

For example, you can add a second start event in the BPMN model that flows directly to the final approval task (the one originally performed at node C). When this alternate start event is used, the earlier steps (A and B) are skipped entirely. You would then start a new process instance using this alternate path and set a flag such as reapproval=true.

When starting the re-approval instance, you can also pass a reference to the original process (e.g., originalProcessInstanceId). This gives Finance full traceability: the completed initial approval chain plus the new targeted re-approval from the updated department head.

This avoids trying to reactivate or manipulate a completed process instance—which isn’t supported—and keeps the audit trail clean while still ensuring that only the necessary approver needs to act again.

1 Like

Thanks for replying @billerby

In our actual business scenario, we do not always revive a process to the last node; rather, we can revive it to any node depending on business needs. Therefore, I will explore how to achieve this by incorporating your approach. Thank you for your help.

@cglin7 in your case I would seriously look into what @billerby suggested in his reply. In my opinion this is a business problem and how you solve it, depends on your business requirements. I do not think that something like this should be coming from the engines themselves.

1 Like