Dynamically Override "User-Task" Name or taskDefKey , using an expression. eg : ${taskDefinitionKey == TASK_ID}

I have a scenario.

My process below, has a business rule task that gives two output variables : TASK_ID and DESCRIPTION.

So based on the value assigned to TASK_ID, i want to create a new user task.

How can i override the user tasks name or task def key during runtime ?

decision_tbl_fallout_type.dmn (11.4 KB)

Hi @Nkosi_M,

You can use a task listener: Delegation Code | docs.camunda.org.

In the task listener you have access to the DelegateTask object and you can set the attributes like names.

The task definition key is the task ID in the bpmn file and I would not change it (maybe it’s even not possible). This is the link to the model and saved in the database.

Hope this helps, Ingo

1 Like

Brilliant… thank you for the prompt response and pointing me in the right direction