Thomas
Thomas

Reputation: 1140

How to log the state of a process with camunda?

How to log the state and the run of a process with camunda ? Something like a historic of actions.

I use Camunda 7.1.0 build with maven on Tomcat

Upvotes: 1

Views: 920

Answers (1)

Martin Schimak
Martin Schimak

Reputation: 1373

I assume you want to retrieve that kind of information programmatically. From the ProcessEngine you can retrieve the historyService and create a query for "ActivityInstances", e.g. like

processEngine.getHistoryService().createHistoricActivityInstanceQuery()
.processDefinitionId("myProcess").processInstanceId(pid).orderByHistoricActivityInstanceStartTime().list();

Make sure that the history level of the engine is set at least to level "activity". Otherwise you will just see currently active ActivityInstances, but no historic ones.

Upvotes: 4

Related Questions