多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
```java @Test public void queryProcessInstance() { // 获取引擎 ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); // 获取RunTimeService RuntimeService runtimeService = processEngine.getRuntimeService(); List<ProcessInstance> list = runtimeService .createProcessInstanceQuery() .processDefinitionKey("evectionProcess")//流程key .list(); for (ProcessInstance processInstance : list) { System.out.println("----------------------------"); System.out.println("流程实例id:" + processInstance.getProcessInstanceId()); System.out.println("流程定义id:" + processInstance.getProcessDefinitionId()); System.out.println("是否执行完成:" + processInstance.isEnded()); System.out.println("是否暂停:" + processInstance.isSuspended()); System.out.println("当前活动标识:" + processInstance.getActivityId()); System.out.println("业务标识:" + processInstance.getBusinessKey()); System.out.println("流程部署id;" + processInstance.getDeploymentId()); System.out.println("流程key:" + processInstance.getProcessDefinitionKey()); System.out.println("流程名称:" + processInstance.getProcessDefinitionName()); System.out.println("流程版本号:" + processInstance.getProcessDefinitionVersion()); } //---------------------------- //流程实例id:2501 //流程定义id:evectionProcess:1:4 //是否执行完成:false //是否暂停:false //当前活动标识:null //业务标识:null //流程部署id;1 //流程key:evectionProcess //流程名称:出差申请流程 //流程版本号:1 //---------------------------- //流程实例id:7501 //流程定义id:evectionProcess:1:4 //是否执行完成:false //是否暂停:false //当前活动标识:null //业务标识:1001 //流程部署id;1 //流程key:evectionProcess //流程名称:出差申请流程 //流程版本号:1 } ```