Change process name after start

#1

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).

Thanks in advance!
Wim

#2

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

#3

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

Martin

1 Like
#4

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
#5

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

#6

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