Hi all,
I need to update the process instance name based on the current name using a Script. I thought something like below. But I don't know how to get the processInstance object from the execution. Any advice?
Thanks,
currentProcessName = processInstance.getName();
switch (currentProcessName) {
case "ABC":
execution.getEngineServices().getRuntimeService().setProcessInstanceName(execution.getProcessInstanceId(), "New ABC");
break;
case "CDE":
execution.getEngineServices().getRuntimeService().setProcessInstanceName(execution.getProcessInstanceId(), "Something else CDE");