cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti creates multiple Runtime Tasks for a single synchronous process instance

himanshudewan
Champ in-the-making
Champ in-the-making
Hi

I was implementing Activiti in a personal project of mine and was facing a peculiar issue.

So, my process is a sequential process with no async or parallel executions. Now, when I complete one task, it is removed from the ACT_RU_TASK_ table and the next task's entry, according to the process definition, is created in the same db. Now, the problem is, I have noticed that a few times, I have multiple entries in the ACT_RU_TASK_ table for the same process instance even though I have no parallel executions whatsoever. So, technically, even if the execution (from the ACT_RU_EXECUTIONS) shows the current activity_Id, the the runtime task table has multiple entries for the same process. In a lot of cases, these task entries are the subsequent tasks of the activity at which the process currently is.

This kind of anomaly happens a few times (say 10 times for every 200 process instances deployed). Maybe, my understanding of the process creation and completion is incorrect. Would be really grateful if someone can help me around this problem.

Regards

Himanshu
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hi Himanshu,

In a sequential process the ACT_RU_TASK should only contain one entry for a process instance. Maybe you can share your process definition and a screenshot of what you see in the database. Would be good to add some additional remarks about when exactly you see this happening.

Best regards,

himanshudewan
Champ in-the-making
Champ in-the-making
Hi trademak

Thanks for the prompt reply. I am attaching a screenshot of the shot for a process instance for which we have multiple runtime tasks (this is ACT_RU_TASK table). Due to a non-disclosure clause associated with my project, I won't be able to provide you the process definition. However, I can provide you specific details with regards to it in case you require. Apologies for that.

Can you think up of some particular reasons due to which such a behaviour may be seen? Could it be due to some configuration associated with spring or the db (mysql) or while defining the process definition?

574056 1 573466 573466 test:17:567515  Print Documents NULL  label.printdocs     PrintDocuments NULL  NULL NULL 50 2015-03-05 17:06:54 NULL NULL 1  NULL

574093 1 573466 573466 test:17:567515        Enrolment          NULL   label.enrollment Enrollment NULL  NULL NULL 50 2015-03-05 17:19:19 NULL NULL 1  NULL


According to ACT_RU_EXECUTION, the process with the pid 573466 is still at print documents stage.

jbarrez
Star Contributor
Star Contributor
> Can you think up of some particular reasons due to which such a behaviour may be seen

No, and the scenario sounds very unlikely.

Without process definition, we are not able to say anything. The log lines you posted there are meaningless for us without context.