!1228 BPM设计器-办理人节点

Merge pull request !1228 from Lesan/feature/bpm-办理人
This commit is contained in:
芋道源码 2025-02-12 10:21:58 +00:00 committed by Gitee
commit 25c277fbf0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 13 additions and 3 deletions

View File

@ -25,6 +25,7 @@ public enum BpmSimpleModelNodeTypeEnum implements ArrayValuable<Integer> {
START_USER_NODE(10, "发起人", "userTask"), // 发起人节点前端的开始节点Id 固定
APPROVE_NODE(11, "审批人", "userTask"),
COPY_NODE(12, "抄送人", "serviceTask"),
TRANSACTOR_NODE(13, "办理人", "userTask"),
DELAY_TIMER_NODE(14, "延迟器", "receiveTask"),
TRIGGER_NODE(15, "触发器", "serviceTask"),

View File

@ -40,7 +40,7 @@ public class SimpleModelUtils {
static {
List<NodeConvert> converts = asList(new StartNodeConvert(), new EndNodeConvert(),
new StartUserNodeConvert(), new ApproveNodeConvert(), new CopyNodeConvert(),
new StartUserNodeConvert(), new ApproveNodeConvert(), new CopyNodeConvert(), new TransactorNodeConvert(),
new DelayTimerNodeConvert(), new TriggerNodeConvert(),
new ConditionBranchNodeConvert(), new ParallelBranchNodeConvert(), new InclusiveBranchNodeConvert(), new RouteBranchNodeConvert());
converts.forEach(convert -> NODE_CONVERTS.put(convert.getType(), convert));
@ -514,6 +514,13 @@ public class SimpleModelUtils {
}
private static class TransactorNodeConvert extends ApproveNodeConvert {
@Override
public BpmSimpleModelNodeTypeEnum getType() {
return BpmSimpleModelNodeTypeEnum.TRANSACTOR_NODE;
}
}
private static class CopyNodeConvert implements NodeConvert {
@Override
@ -785,10 +792,11 @@ public class SimpleModelUtils {
BpmSimpleModelNodeTypeEnum nodeType = BpmSimpleModelNodeTypeEnum.valueOf(currentNode.getType());
Assert.notNull(nodeType, "模型节点类型不支持");
// 情况START_NODE/START_USER_NODE/APPROVE_NODE/COPY_NODE/END_NODE
// 情况START_NODE/START_USER_NODE/APPROVE_NODE/COPY_NODE/END_NODE/TRANSACTOR_NODE
if (nodeType == BpmSimpleModelNodeTypeEnum.START_NODE
|| nodeType == BpmSimpleModelNodeTypeEnum.START_USER_NODE
|| nodeType == BpmSimpleModelNodeTypeEnum.APPROVE_NODE
|| nodeType == BpmSimpleModelNodeTypeEnum.TRANSACTOR_NODE
|| nodeType == BpmSimpleModelNodeTypeEnum.COPY_NODE
|| nodeType == BpmSimpleModelNodeTypeEnum.END_NODE) {
// 添加元素

View File

@ -479,7 +479,8 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
// 1. 开始节点/审批节点
if (ObjectUtils.equalsAny(node.getType(),
BpmSimpleModelNodeTypeEnum.START_USER_NODE.getType(),
BpmSimpleModelNodeTypeEnum.APPROVE_NODE.getType())) {
BpmSimpleModelNodeTypeEnum.APPROVE_NODE.getType(),
BpmSimpleModelNodeTypeEnum.TRANSACTOR_NODE.getType())) {
List<Long> candidateUserIds = getTaskCandidateUserList(bpmnModel, node.getId(),
startUserId, processDefinitionInfo.getProcessDefinitionId(), processVariables);
activityNode.setCandidateUserIds(candidateUserIds);