Is there any reason not to use HistoryService method createHistoricProcessInstanceQuery to get a process that is active. As opposed to using runtimeService.
def processesQuery = historyService.createHistoricProcessInstanceQuery().
Using HistoryService would make it easier if to return the process if it was active or completed.
Any drawbacks to using historyService instead of runtimeService?
I’m not sure that either of those is insurmountable, especially if you control the history configuration.
Thanks for the reply.
I have turned history level to “full”.
I am assuming that async history is disabled by default. I have not configured it to be active.
When a process instance is finished, it will be removed from the runtime tables. However, it will never be deleted from the historical tables. As such, queries agains the runtime table will be faster as the historical counterparts will keep growing.