// save the process instance node to the archived process node
ProcessNode archivedProcessNode = processRepositoryService.findArchivedByRunningUniqueProcessId(uniqueProcessId);
ProcessInstanceNode processInstanceNode = loadProcessInstanceNode(uniqueProcessId, processInstanceId);
processInstanceNode.moveInstanceToArchive(archivedProcessNode, processInstanceId);
processInstanceNode.setProcessInstanceEndTime(endTime);
}
/**