Change process name after start

Hi,
I’ve been looking for a way to change the “name” of a process once it has started.

I know you can set it via the flowable task application while starting, but I can’t find a way to change it afterwards. The value also does not seem to be available anywhere in the REST interface (unless i’m overlooking it).

image

Thanks in advance!
Wim

Anyone has an idea if it’s possible to change this name? Or set it dynamically based on data in the input form?

Hi,
you can set process instance name through API call e.g.
org.flowable.engine.RuntimeService#setProcessInstanceName

Martin

1 Like

Hi wjansenw,

I ran into the same issue.
I solved this with the following javascriptcode:

var Logger = Java.type(‘org.slf4j.LoggerFactory’);
var log = Logger.getLogger(‘MyProcess’);

var processName = execution.getVariable(“processname”);
var idProcessInstance = execution.getProcessInstanceId();

runtimeService.setProcessInstanceName(idProcessInstance, processName);

Hope it helps

2 Likes

Hi. Any way to change the name use the REST API?

Currently this functionality is not exposed over the REST API. However, it could be and it is not the difficult to be done. Would you be interested in providing a PR with this change. We can help you out of course :smile:

Cheers,
Filip