05-10-2017 02:22 AM
Dear community.
Is there a way to modify the name of a process instance?
I'd prefer to use an execution (or task) listener for this purpose. Having ${processInfoBean.getProcessName(execution)} to get the process instance name I wonder whether there is a method to modify the process instance name.
Best regards
Marco
05-10-2017 02:47 AM
> Is there a way to modify the name of a process instance?
You can user public api 'RuntimeService.setProcessInstanceName(String processInstanceId, String name)'.
RuntimeService (Activiti - Engine 5.22.0 API)
* Java example
execution.getEngineServices().getRuntimeService().setProcessInstanceName(execution.getProcessInstanceId(), %NAME%);
* Expression example
${execution.getEngineServices().getRuntimeService().setProcessInstanceName(execution.getProcessInstanceId() , %NAME%)}
05-15-2017 01:37 AM
ah ok .. understood.
I was hoping that I could stay on the modelling site of the game but anyhow: thank you very much for the effort .. your help is most appreciated!
06-20-2019 07:14 AM
i tried setting the process instance name in the first user task listener, but it doesnt change the title, i have tried keeping this listener at multiple places but it seems to not change the header in the web.
has anyone tried and got results
07-22-2019 02:58 AM
it seems i can change the title by simply editing it before starting the process. but im still unable to retrieve the same during the execution. can someone help how can i retrieve the title during the execution? i tried to access all fields but no luck.
PS: the title we see in activiti-app whic usualu has format - "process name-current date"
Explore our Alfresco products with the links below. Use labels to filter content by product module.