AnsweredAssumed Answered

How to retrieve active process instances

Question asked by tobiasw. on Mar 12, 2012
Latest reply on Mar 13, 2012 by trademak
Hi,

I was wondering how I could get a list of all processInstances that are alive on a runtime service. With alive I mean all instances, including instances in wait state and currently processing something.

As I understand, as soon as a processInstance hits a wait state, e.g. user task, the entire process isntance is persisted into a database able?

"At such a wait state, the current state of the process instance is stored in the database."
http://www.activiti.org/userguide/index.html#bpmnFirstExamplStartProcess

Is that the ACT_HI_PROCINST table?

If so, then there are some processInstances in a database table, which I could query, and some are not (only alive somewhere in runtime environment).
What would be your approach to retrieve those instances?

Also, how can I force a processInstance to persist itself upon process start? Basically when it enters the start node?
Not only for this task, but also in case the process engine crashs and I have to restore all instances.

Cheers and kind regards,

Tobi

Outcomes