This example shows you how to undeploy a process.
A process is undeployed by deleting the processDefinition, specified by a processDefinitionID.
After the process is undeployed, no new instance can be started. Existing instances continue to completion.
final ProcessAPI processAPI = TenantAPIAccessor.getProcessAPI(apiSession);
processAPI.deleteProcessDefinition(processDefinitionId)
processAPI.deleteProcessDefinition(processDefinitionId)