查询流程实例
/** * 查询流程实例 * @author Administrator * */ public class Test05 { public static void main(String[] args) { ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); //查询所有的流程实例 List<ProcessInstance> list = processEngine.getRuntimeService() .createProcessInstanceQuery().list(); System.out.println(list.size()); //遍历所有的的流程 for(ProcessInstance pi:list){ System.out.println(pi.getId()); System.out.println(pi.getProcessDefinitionId()); System.out.println(pi.getProcessInstanceId()); System.out.println(pi.getActivityId()); System.out.println(pi.getParentId()); System.out.println("---------------------------"); } } }