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