Process instance last updated datetime

Hi Community Folks,

I am trying to get the last updated datetime for the given process instance. Since there is no field for the same in ACT_RU_EXECUTION and ACT_HI_PROCINST database table, I am not sure where can I get this details ?

p.s I found table named ACT_HI_DETAIL which has time field but I am not sure what details this tables store and should I use it or not.

Thanks,
Hiren

Can you explain the dates you’re looking for and what you’d like to use them for?

Hi Niall,
Thanks for the reply… I am looking for the date which gets updated every time an action happens on process instance (i.e process instance started, variable add/update, suspended, completed). I want to get the last updated date of process instance in my REST API.

Hi @Hiren_Pandit,

the date you are looking for is not available on the process instance level.

But you can query for the activities of a process instance and sort by start or end date and take the date from the first activity: https://docs.camunda.org/manual/7.13/reference/rest/history/activity-instance/get-activity-instance-query/

Hope this helps, Ingo

Hi @Ingo_Richtsmeier,

Thanks for the quick response. I guess that’s the way for now. I am using Oracle database and I don’t want to query history tables as they are supposed to get bigger over time. As of now, how stable it is to use Cassandra or Elasticsearch for history-related tables? p.s using camunda spring-boot 7.13.

Thanks, Hiren

Hi @Hiren_Pandit,

you can write history data to a different data sunk with the help of a custom history backend: https://docs.camunda.org/manual/7.13/user-guide/process-engine/history/#provide-a-custom-history-backend.

Or you can use history cleanup to keep the amount of historic data in the Oracle database stable: https://docs.camunda.org/manual/7.13/user-guide/process-engine/history/#history-cleanup.

You have judge for yourself if it’s worth to implement a custom history backend for your use case.

Hope this helps, Ingo

Ok. Thanks for your inputs.