History not using dynamic task name

Hi there,

in How to change task name in tasklist it is described how to change the name of a task based on a process variable.

I opted to go with an expression (${taskTitle}). However, the generated name is not used when the completed task is written into the history by camunda. Instead the literal “${taskTitle}” is saved as the historic tasks name.

Is there any way to make the history take the changing of the task name into account?

Thanks,
Ben

I have recreated the problem in a simple project:
https://github.com/BenFuernrohr/CamundaExamples/blob/master/TaskNameHistoryExample/src/test/java/bfu/camunda/examples/tasknamehistoryexample/TestCustomNameCreation.java

As it turns out, the resolved task name DOES get saved in the corresponding historic task instance (see test #2).
It just does not get saved in the corresponding historic activity (see test #3, which fails).

That does resolve my initial problem. But is there an explanation for this behaviour? It seems inconsistent.

Hi @Ben_F,

I think reason for this is that activity is a common concept used for service tasks and other types as well and task is the user task, where the task object is saved.

Hope this helps, Ingo