1

We have created a workflow using activiti bpm modeler application(using function call runtimeService.startProcessInstanceByKey("sampleProcess")

Let us say N number of time this function has been called.

What is the method for getting all currently running instances(N) for above model?

Also, what is the table name in the database where this can be checked - for getting currently running instances?

Neo
  • 5,070
  • 10
  • 46
  • 65

1 Answers1

0

For first part of question getting all instances for a given model, Please find code snippet below:

import org.flowable.engine.runtime.ProcessInstance;
import java.util.List;
List<ProcessInstance> instanceList = runtimeService
          .createProcessInstanceQuery()
          .processDefinitionKey("sampleProcess")
          .list();

For 2nd part of the question, getting table name for currently running instances, please use this table: ACT_HI_PROCINST

Neo
  • 5,070
  • 10
  • 46
  • 65