How to change dynamically the task name in Tasklist

Hi,

I make some process that allow me to change dynamically the name on the task in tasklist. It works well.
I would to do it properly in order to not the dynamic part in the task name.

I think I could use a task listener but I don’t know how to do.

Please find below the BPMN files.
form-identify-site.form (582 Bytes)
test_identify-instance-change-task.bpmn (6.8 KB)

Thanks for your help,
Patrick

Hi @modibe,

I believe that below example is what you are looking for

Hi @hassang ,

Thanks for your response. This should solve my issue but I only use camunda modeler to configure my workflow.

Thanks,
Patrick

Hi @modibe,

You can implement the task listener using scripting and as external resource (script file to be deployed along with the model in a single deployment) so the same script could be reused by multiple user tasks.

Hi @modibe,

Kindly find the attached simplified example.
tasklistener_script_example.bpmn (3.7 KB)

And below is the content of taskName.js file
image

Deploy the script file “taskName.js” along with the model as illustrated in the below snip

1 Like

Hi @hassang,

I appreciate your help. This work for me.
Thank you,
Patrick

1 Like

Please keep in mind that each time you have a new version of your model, the new version should be deployed along with the script file.

1 Like