| | |
| | | |
| | | private static BpmSimpleModelNodeVO buildStartNode() { |
| | | return new BpmSimpleModelNodeVO().setId(START_EVENT_NODE_ID) |
| | | .setName(BpmSimpleModelNodeType.START_USER_NODE.getName()) |
| | | .setName(BpmSimpleModelNodeType.START_NODE.getName()) |
| | | .setType(BpmSimpleModelNodeType.START_NODE.getType()); |
| | | } |
| | | |
| | |
| | | userTask.setName(node.getName()); |
| | | |
| | | // 人工审批 |
| | | addExtensionElement(userTask, USER_TASK_APPROVE_TYPE, BpmUserTaskApproveTypeEnum.USER.getType()); |
| | | addExtensionElement(userTask, BpmnModelConstants.USER_TASK_APPROVE_TYPE, BpmUserTaskApproveTypeEnum.USER.getType()); |
| | | // 候选人策略为发起人自己 |
| | | addCandidateElements(BpmTaskCandidateStrategyEnum.START_USER.getStrategy(), null, userTask); |
| | | // 添加表单字段权限属性元素 |
| | |
| | | } |
| | | |
| | | private static void simulateNextNode(BpmSimpleModelNodeVO currentNode, Map<String, Object> variables, |
| | | List<BpmSimpleModelNodeVO> resultNodes) { |
| | | List<BpmSimpleModelNodeVO> resultNodes) { |
| | | // 如果不合法(包括为空),则直接结束 |
| | | if (!isValidNode(currentNode)) { |
| | | return; |
| | |
| | | |
| | | // 情况:START_NODE/START_USER_NODE/APPROVE_NODE/COPY_NODE/END_NODE |
| | | if (nodeType == BpmSimpleModelNodeType.START_NODE |
| | | || nodeType == BpmSimpleModelNodeType.START_USER_NODE |
| | | || nodeType == BpmSimpleModelNodeType.APPROVE_NODE |
| | | || nodeType == BpmSimpleModelNodeType.COPY_NODE |
| | | || nodeType == BpmSimpleModelNodeType.END_NODE) { |
| | | || nodeType == BpmSimpleModelNodeType.START_USER_NODE |
| | | || nodeType == BpmSimpleModelNodeType.APPROVE_NODE |
| | | || nodeType == BpmSimpleModelNodeType.COPY_NODE |
| | | || nodeType == BpmSimpleModelNodeType.END_NODE) { |
| | | // 添加元素 |
| | | resultNodes.add(currentNode); |
| | | } |
| | |
| | | // 查找满足条件的 BpmSimpleModelNodeVO 节点 |
| | | BpmSimpleModelNodeVO matchConditionNode = CollUtil.findOne(currentNode.getConditionNodes(), |
| | | conditionNode -> !BooleanUtil.isTrue(conditionNode.getDefaultFlow()) |
| | | && evalConditionExpress(variables, conditionNode)); |
| | | && evalConditionExpress(variables, conditionNode)); |
| | | if (matchConditionNode == null) { |
| | | matchConditionNode = CollUtil.findOne(currentNode.getConditionNodes(), |
| | | conditionNode -> BooleanUtil.isTrue(conditionNode.getDefaultFlow())); |