All completed tasks move from ACT_RU_TASK to ACT_HI_TASKINST on completion. Also task local variables are moving to history table. Is there anyway to prevent this and my task stay as runtime data only.
Activiti uses runtime and history tables. When a task is completed, it's done, so the information is only available in the history tables. Note, that the history tables also contain information about running process instances and tasks not only completed ones. Why would you want to prevent this default behaviour? What's your use case?
I also want to ask the same question. For me use case is ..I want to retrieve all the tasks If i invoke using createTaskQuery API, i can get only tasks which are not completed. As once i complete the tasks, it goes to history tables. and i need history service to get completed tasks. Also from it if i am not wrong i cant get all the taskLocalVariables.
If i disable this removal of task from ACT_RU_TASK on completion, in a single query i can get all the tasks.