Getting a Process Instance name from Script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2021 01:27 PM
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");
break;
}
Labels:
- Labels:
-
Alfresco Process Services
0 REPLIES 0
