We have workflows with userTasks where we set a certain description in a taskListener to make it easier to find it afterwards. This worked with activiti 5 very well, but it seems that something has changed with flowable 6.
I can see, that the description is saved to ACT_RU_TASK but not to ACT_HI_TASKINST. If a task is completed we cannot longer find this task in history tables by searching for this description.
An example code snippet:
<userTask id="usertask1" name="usertask1">
<extensionElements>
<activiti:taskListener event="create" class="org.flowable.engine.impl.bpmn.listener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[
System.out.println(task.getName()+" in onCreate. description: ["+task.getDescription()+ "] id: [" +task.getId()+"]")
task.setDescription('idxy')
]]></activiti:string>
</activiti:field>
<activiti:field name="language">
<activiti:string><![CDATA[groovy]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
A workaround is to save the task explicitly with
taskService.saveTask(task)
right after setting the description.
But for me, it seems to be a bug. I think the description should be written to both tables, the runtime and history tables.