在学习博客[(https://blog.csdn.net/puhaiyang/article/details/79845248)]时,注意到Flowable中的各种Service(如下),进而在官网中学习相关知识[https://flowable.com/open-source/docs/bpmn/ch04-API/#the-process-engine-api-and-services]
ProcessInstance pi = runtimeService
.createProcessInstanceQuery()
.processInstanceId(processId)
.singleResult();
Task task = taskService
.createTaskQuery()
.processInstanceId(pi.getId())
.singleResult();
//使用流程实例ID,查询正在执行的执行对象表,返回流程实例对象
String instanceId = task.getProcessInstanceId();
List<Execution> executions = runtimeService
.createExecutionQuery()
.processInstanceId(instanceId)
.list();
自己对照博客修改后的项目地址[https://gitee.com/magic_girl/flowable2]
原文:https://www.cnblogs.com/happen96/p/14701112.html