We have run into a situation where a user task remains in the ACT_RU_TASK table after it has been completed. It was completed by using the Activiti API (formService.submitTaskFormData).After the user task was completed, an end time was recorded for the task in the ACT_HI_TASK table and the process execution continued. The user task was followed by a script task, an exclusive gateway, two more script tasks, and then a new user task. All the subsequent steps were executed successfully and the next user task has become active. The process instance is in a state where it has two active, sequential tasks. taskService.createTaskQuery().processInstanceId(<processInstanceId>) returns two active user tasks.I have investigated all the logs without finding any related error situations. The process definition is well proven and has been used for many process instances. This is the first time we have run into a situation like this. Do you have any idea on how our process instance has ended up in this state? And what is the best way to solve the problem? We're running Activiti 5.17.0.2, Java 8, Debian Linux.The completed user task is available both in ACT_HI_TASKINST and ACT_RU_TASK:
select h.id_, h.proc_inst_id_, h.name_, h.assignee_, h.start_time_, h.end_time_, h.duration_, h.delete_reason_, h.claim_time_, a.create_time_, a.suspension_state_, a.delegation_
from act_hi_taskinst h
join act_ru_task a on a.id_ = h.id_
and h.end_time_ is not null;
1064109 1064090 Behandles? OLABRE 19.04.2016 15.34.52,910000000 19.04.2016 16.33.21,447000000 3508537 completed 19.04.2016 16.33.06,648000000 19.04.2016 15.34.52,910000000 1
Process instance activities:
select * from act_hi_actinst where proc_inst_id_ =1064090;
ID_;PROC_DEF_ID_;PROC_INST_ID_;EXECUTION_ID_;ACT_ID_;ACT_NAME_;ACT_TYPE_;ASSIGNEE_;START_TIME_;END_TIME_;DURATION_;TASK_ID_;CALL_PROC_INST_ID;TENANT_ID_
1064092;hoeringsprosess:16:117247;1064090;1064090;startevent1;Start;startEvent;;19.04.2016 15.34.51,442000000;19.04.2016 15.34.51,442000000;0;;;
1064095;hoeringsprosess:16:117247;1064090;1064090;scripttask30;Initialiser;scriptTask;;19.04.2016 15.34.51,442000000;19.04.2016 15.34.51,457000000;15;;;
1064105;hoeringsprosess:16:117247;1064090;1064090;scripttask1;pre;scriptTask;;19.04.2016 15.34.51,457000000;19.04.2016 15.34.52,910000000;1453;;;
1064108;hoeringsprosess:16:117247;1064090;1064090;usertask2;Behandles?;userTask;OLABRE;19.04.2016 15.34.52,910000000;19.04.2016 16.33.21,447000000;3508537;1064109;;
1064598;hoeringsprosess:16:117247;1064090;1064090;scripttask2;post;scriptTask;;19.04.2016 16.33.21,447000000;19.04.2016 16.33.27,911000000;6464;;;
1064613;hoeringsprosess:16:117247;1064090;1064090;exclusivegateway2;Exclusive Gateway;exclusiveGateway;;19.04.2016 16.33.27,911000000;19.04.2016 16.33.27,911000000;0;;;
1064614;hoeringsprosess:16:117247;1064090;1064090;scripttask43;Opprett DM saksnr og dok;scriptTask;;19.04.2016 16.33.27,911000000;19.04.2016 16.33.47,692000000;19781;;;
1064619;hoeringsprosess:16:117247;1064090;1064090;scripttask4;pre;scriptTask;;19.04.2016 16.33.47,692000000;19.04.2016 16.33.49,385000000;1693;;;
1064626;hoeringsprosess:16:117247;1064090;1064090;usertask6;Utarbeid best.;userTask;;19.04.2016 16.33.49,385000000;;;1064627;;