核心代码
/**
* 模板任务列表
*
* @param processDefinitionId
* @return
*/
public BaseResponseVO taskList(String processDefinitionId) {
if (StringUtils.isBlank(processDefinitionId)) {
return BaseResponseVO.error("参数为空");
}
Process process = repositoryService.getBpmnModel(processDefinitionId).getProcesses().get(0);
// 获取所有节点
// Collection<FlowElement> flowElements = process.getFlowElements();
// 获取任务节点
List<UserTask> flowElementsOfType = process.findFlowElementsOfType(UserTask.class);
// 数据转化
List<TaskInstanceVO> taskInstanceVOList = new ArrayList<>()