Commit 25c277fbf081cf0191b45f805991dfd1af5d8599
Committed by
Gitee
!1228 BPM设计器-办理人节点
Merge pull request !1228 from Lesan/feature/bpm-办理人
Showing
3 changed files
with
13 additions
and
3 deletions
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/definition/BpmSimpleModelNodeTypeEnum.java
| @@ -25,6 +25,7 @@ public enum BpmSimpleModelNodeTypeEnum implements ArrayValuable<Integer> { | @@ -25,6 +25,7 @@ public enum BpmSimpleModelNodeTypeEnum implements ArrayValuable<Integer> { | ||
| 25 | START_USER_NODE(10, "发起人", "userTask"), // 发起人节点。前端的开始节点,Id 固定 | 25 | START_USER_NODE(10, "发起人", "userTask"), // 发起人节点。前端的开始节点,Id 固定 |
| 26 | APPROVE_NODE(11, "审批人", "userTask"), | 26 | APPROVE_NODE(11, "审批人", "userTask"), |
| 27 | COPY_NODE(12, "抄送人", "serviceTask"), | 27 | COPY_NODE(12, "抄送人", "serviceTask"), |
| 28 | + TRANSACTOR_NODE(13, "办理人", "userTask"), | ||
| 28 | 29 | ||
| 29 | DELAY_TIMER_NODE(14, "延迟器", "receiveTask"), | 30 | DELAY_TIMER_NODE(14, "延迟器", "receiveTask"), |
| 30 | TRIGGER_NODE(15, "触发器", "serviceTask"), | 31 | TRIGGER_NODE(15, "触发器", "serviceTask"), |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java
| @@ -40,7 +40,7 @@ public class SimpleModelUtils { | @@ -40,7 +40,7 @@ public class SimpleModelUtils { | ||
| 40 | 40 | ||
| 41 | static { | 41 | static { |
| 42 | List<NodeConvert> converts = asList(new StartNodeConvert(), new EndNodeConvert(), | 42 | List<NodeConvert> converts = asList(new StartNodeConvert(), new EndNodeConvert(), |
| 43 | - new StartUserNodeConvert(), new ApproveNodeConvert(), new CopyNodeConvert(), | 43 | + new StartUserNodeConvert(), new ApproveNodeConvert(), new CopyNodeConvert(), new TransactorNodeConvert(), |
| 44 | new DelayTimerNodeConvert(), new TriggerNodeConvert(), | 44 | new DelayTimerNodeConvert(), new TriggerNodeConvert(), |
| 45 | new ConditionBranchNodeConvert(), new ParallelBranchNodeConvert(), new InclusiveBranchNodeConvert(), new RouteBranchNodeConvert()); | 45 | new ConditionBranchNodeConvert(), new ParallelBranchNodeConvert(), new InclusiveBranchNodeConvert(), new RouteBranchNodeConvert()); |
| 46 | converts.forEach(convert -> NODE_CONVERTS.put(convert.getType(), convert)); | 46 | converts.forEach(convert -> NODE_CONVERTS.put(convert.getType(), convert)); |
| @@ -514,6 +514,13 @@ public class SimpleModelUtils { | @@ -514,6 +514,13 @@ public class SimpleModelUtils { | ||
| 514 | 514 | ||
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | + private static class TransactorNodeConvert extends ApproveNodeConvert { | ||
| 518 | + @Override | ||
| 519 | + public BpmSimpleModelNodeTypeEnum getType() { | ||
| 520 | + return BpmSimpleModelNodeTypeEnum.TRANSACTOR_NODE; | ||
| 521 | + } | ||
| 522 | + } | ||
| 523 | + | ||
| 517 | private static class CopyNodeConvert implements NodeConvert { | 524 | private static class CopyNodeConvert implements NodeConvert { |
| 518 | 525 | ||
| 519 | @Override | 526 | @Override |
| @@ -785,10 +792,11 @@ public class SimpleModelUtils { | @@ -785,10 +792,11 @@ public class SimpleModelUtils { | ||
| 785 | BpmSimpleModelNodeTypeEnum nodeType = BpmSimpleModelNodeTypeEnum.valueOf(currentNode.getType()); | 792 | BpmSimpleModelNodeTypeEnum nodeType = BpmSimpleModelNodeTypeEnum.valueOf(currentNode.getType()); |
| 786 | Assert.notNull(nodeType, "模型节点类型不支持"); | 793 | Assert.notNull(nodeType, "模型节点类型不支持"); |
| 787 | 794 | ||
| 788 | - // 情况:START_NODE/START_USER_NODE/APPROVE_NODE/COPY_NODE/END_NODE | 795 | + // 情况:START_NODE/START_USER_NODE/APPROVE_NODE/COPY_NODE/END_NODE/TRANSACTOR_NODE |
| 789 | if (nodeType == BpmSimpleModelNodeTypeEnum.START_NODE | 796 | if (nodeType == BpmSimpleModelNodeTypeEnum.START_NODE |
| 790 | || nodeType == BpmSimpleModelNodeTypeEnum.START_USER_NODE | 797 | || nodeType == BpmSimpleModelNodeTypeEnum.START_USER_NODE |
| 791 | || nodeType == BpmSimpleModelNodeTypeEnum.APPROVE_NODE | 798 | || nodeType == BpmSimpleModelNodeTypeEnum.APPROVE_NODE |
| 799 | + || nodeType == BpmSimpleModelNodeTypeEnum.TRANSACTOR_NODE | ||
| 792 | || nodeType == BpmSimpleModelNodeTypeEnum.COPY_NODE | 800 | || nodeType == BpmSimpleModelNodeTypeEnum.COPY_NODE |
| 793 | || nodeType == BpmSimpleModelNodeTypeEnum.END_NODE) { | 801 | || nodeType == BpmSimpleModelNodeTypeEnum.END_NODE) { |
| 794 | // 添加元素 | 802 | // 添加元素 |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| @@ -479,7 +479,8 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService | @@ -479,7 +479,8 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService | ||
| 479 | // 1. 开始节点/审批节点 | 479 | // 1. 开始节点/审批节点 |
| 480 | if (ObjectUtils.equalsAny(node.getType(), | 480 | if (ObjectUtils.equalsAny(node.getType(), |
| 481 | BpmSimpleModelNodeTypeEnum.START_USER_NODE.getType(), | 481 | BpmSimpleModelNodeTypeEnum.START_USER_NODE.getType(), |
| 482 | - BpmSimpleModelNodeTypeEnum.APPROVE_NODE.getType())) { | 482 | + BpmSimpleModelNodeTypeEnum.APPROVE_NODE.getType(), |
| 483 | + BpmSimpleModelNodeTypeEnum.TRANSACTOR_NODE.getType())) { | ||
| 483 | List<Long> candidateUserIds = getTaskCandidateUserList(bpmnModel, node.getId(), | 484 | List<Long> candidateUserIds = getTaskCandidateUserList(bpmnModel, node.getId(), |
| 484 | startUserId, processDefinitionInfo.getProcessDefinitionId(), processVariables); | 485 | startUserId, processDefinitionInfo.getProcessDefinitionId(), processVariables); |
| 485 | activityNode.setCandidateUserIds(candidateUserIds); | 486 | activityNode.setCandidateUserIds(candidateUserIds); |