Hello,
I have bpmn model which is having predefined process id & Process name. But i want to change it dynamically while starting the process instance . Can anyone help me ?
Here is my model code :
<bpmn:collaboration id="Collaboration_03cxq62">
<bpmn:participant id="start" name="SomeName" processRef="executionOne" />
</bpmn:collaboration>
<bpmn:process id="executionOne" name="SomeName" isExecutable="true"
camunda:versionTag="1.1">
I am using spring boot to start my process instance.
Here is my code :
runtimeService.startProcessInstanceByKey("executionOne", variables);
This starts Properly. But When there is some task created, The Process Name By default always set as “SomeName”
Is there any way i can change the process name during runtime or any other way ?
Hi @Jena_Sthitaprajna,
That is not possible. The process model is a design time artifact, so changing its properties at runtime on a per-instance basis does not really fit.
What is your use case for this? Perhaps there is a better way to achieve it.
Cheers,
Thorben
Thanks for your reply.
Here is my usecase - Whenever i get a request on my application i start a process.
runtimeService.startProcessInstanceByKey("executionOne", variables);
Once this process created it is assigned to one of the user/operator who will review/complete it. I can set the Task name with content as per my requirement while assigning the task from my java code.
delegateTask.setName("Hello This is a Task");
but wanted to show some proper/useful content for the user/operator, but looks like as per your comment “SomeName” will be always seen/shown to user.
When you create a task filter, you can specify a set of process variables (see https://docs.camunda.org/manual/7.6/webapps/tasklist/filters/). Their values will be displayed along with the filter results, see for example https://docs.camunda.org/manual/7.6/webapps/tasklist/img/tasklist-dashboard-detail.png. That way, you can display instance-specific data.
Cheers,
Thorben
2 Likes