I am using this API to move current execution back to previous tasks:
runtimeService.createChangeActivityStateBuilder() .moveSingleExecutionToActivityIds(executionId, previousTaskIds) .changeState()
after called changeState(), I did a task query like :
taskService.createTaskQuery() .processInstanceId(processInstanceId) .taskDefinitionKeys(previousTaskIds) .list()
when I used these APIs on a regular user task, the TaskQuery was acted like what I expected, it listed tasks in previousTaskIds
but when the task is a multi instance task, I called these APIs in an ExecutionListener, TaskQuery was only listed the old tasks, not the new tasks in previousTaskIds
What should I do to make TaskQuery to list new tasks in previousTaskIds when the using these APIs in a multi instance execution listener?