fix(流程审批): 移除流程驳回,新增审批拒绝,拒绝操作会直接终止流程。

This commit is contained in:
konbai
2022-10-09 22:59:32 +08:00
parent 4ab600987b
commit 4d90e375bb
6 changed files with 71 additions and 124 deletions

View File

@@ -66,6 +66,32 @@ public class ModelUtils {
return null;
}
/**
* 获取结束节点
*
* @param model bpmnModel对象
* @return 结束节点未找到开始节点返回null
*/
public static EndEvent getEndEvent(BpmnModel model) {
Process process = model.getMainProcess();
return getEndEvent(process.getFlowElements());
}
/**
* 获取结束节点
*
* @param flowElements 流程元素集合
* @return 结束节点未找到开始节点返回null
*/
public static EndEvent getEndEvent(Collection<FlowElement> flowElements) {
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof EndEvent) {
return (EndEvent) flowElement;
}
}
return null;
}
/**
* 获取所有用户任务节点
*