How to retrieve completed processInstances with historyLevel = none

Hi guys,

We’d like to reduce history usage to a minimum, in fact we’d like to be able to query just the last “snapshot” of every completed process instance, but just that (no activity history, nor tasks history, etc.).

At the same time we’d like to get to retrieve those processInstances with the simplest way to do it.

As far as we know:

  • with historyLevel = none there is no way to get the last processInstance once it’s completed. Is there an alternative way to get it without having to switch to the next history level? (that would historify activities, tasks).
  • There is the possibility of coding our own Custom History level, but we think that this could be cumbersome or could lead to future incompatibilities with future versions of Camunda.

Also, do you manage additional/complementary tools to query those process instances that have been completed?
We are using elasticsearch in order to aggregate both running instances and completed instances, but those completed instances are retrieved from camunda’s history…

I think that there has to be a more simple/efficient way to achieve this, and that’s why I come to you.
Thanks in advance,
Alfonso.

if history level is set to none, then no history events are fired. So you can’t retrieve completed instances details.

<property name="history">none</property>

To reduce the amount of history to be stored or maintained in DB: