I have a process which contains only service tasks. I set it up with a FULL history level and in the act_hi_procinst table, only the start_time_ column is set. The end_time_ column is null, even the process instance has ended.
Botton line: I’m developing a monitoring tool based on Camunda’s DB. One of my metrics is the time elapsed of a process instance. If it’s not on the act_hi_procinst, where can i find it?
Does the problem occur with all of the instances which do you start or only with this particular?
Can you navigate to the runtime view in Cockpit and check if the instance is still running, there are tokens in the view.
Only If you were using parallel gateway instead of exclusive gateway then we may have remaining active activity even if one token reaches the end event.
But for the current above model, process instance should ends when token reaches the end event.
Hi @hassang.
I’ve debug the code and set breakpoints throughout the code. The curious thing is that the public setter method “setEndTime” is never reached.
Look the prints where I put the breakpoints:
In this first print, the code never enters the “else”. I deduced that the "dbEntityManager.insert(historyEvent) is the insert on the table act_hi_procinst, setting the start_time_. And the else, where we see the dbEntityManager.merge(historyEvent) is the update that should set the end_time_ column.
I received an e-mail with your reply, but you withdrawn your post. But I’ve changed the undefined task to service task. The result is here testHistory.bpmn (6.7 KB)
I’ll try a different aproach. I’ll install a brand new Camunda engine and new configuration and execute this same bpmn. I’ll come back later with the results.
I still haven’t found what the issue was. But since this is not a critical problem for my application, I’ve decided to deal with it later. If I find anything important, I’ll report here.
If you set “Async” on any element, end_time_ will be set. I also have the same problem. This is weird because remove_time_ is set correctly even if I am using the endTimeBased strategy and that’s why I expected end_time_ to be set as well.