【功能优化】工作流:审批详情,接入 BpmnModelUtils 进行预测

This commit is contained in:
YunaiV 2024-10-23 09:36:43 +08:00
parent 3afe93a157
commit e8c9c2eedd
2 changed files with 11 additions and 1 deletions

View File

@ -788,4 +788,14 @@ public class BpmnModelUtils {
return Boolean.TRUE.equals(result);
}
@SuppressWarnings("PatternVariableCanBeUsed")
public static boolean isSequentialUserTask(FlowElement flowElement) {
if (!(flowElement instanceof UserTask)) {
return false;
}
UserTask userTask = (UserTask) flowElement;
MultiInstanceLoopCharacteristics loopCharacteristics = userTask.getLoopCharacteristics();
return loopCharacteristics != null && loopCharacteristics.isSequential();
}
}