mirror of
https://github.com/YunaiV/ruoyi-vue-pro.git
synced 2025-10-27 03:36:57 +08:00
review:【bpm 工作流】usertask 的跳过表达式
This commit is contained in:
@ -13,6 +13,7 @@ import lombok.Getter;
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmTaskStatusEnum {
|
||||
|
||||
SKIP(-2, "跳过"),
|
||||
NOT_START(-1, "未开始"),
|
||||
RUNNING(1, "审批中"),
|
||||
|
||||
@ -471,8 +471,6 @@ public class SimpleModelUtils {
|
||||
return userTask;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void addUserTaskListener(BpmSimpleModelNodeVO node, UserTask userTask) {
|
||||
List<FlowableListener> flowableListeners = new ArrayList<>(3);
|
||||
if (node.getTaskCreateListener() != null
|
||||
@ -1021,7 +1019,7 @@ public class SimpleModelUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据跳过表达式,判断是否跳过此节点。
|
||||
* 根据跳过表达式,判断是否跳过此节点
|
||||
*/
|
||||
public static boolean isSkipNode(BpmSimpleModelNodeVO currentNode, Map<String, Object> variables) {
|
||||
if (StrUtil.isEmpty(currentNode.getSkipExpression())) {
|
||||
|
||||
@ -462,13 +462,16 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
||||
return approvalNodes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取结束节点的状态
|
||||
*/
|
||||
private Integer getEndActivityNodeStatus(HistoricTaskInstance task) {
|
||||
Integer status = FlowableUtils.getTaskStatus(task);
|
||||
return status == null ? BpmTaskStatusEnum.SKIP.getStatus() : status; // 结束节点未获取到状态,为跳过状态
|
||||
if (status != null) {
|
||||
return status;
|
||||
}
|
||||
// 结束节点未获取到状态,为跳过状态。可见 bpmn 或者 simple 的 skipExpression
|
||||
return BpmTaskStatusEnum.SKIP.getStatus();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user