📖 BPMN:code review bpmn 中辅助查找代码
This commit is contained in:
parent
b5777b57f1
commit
9fbbce4e8d
|
@ -3,16 +3,16 @@ package cn.iocoder.yudao.framework.flowable.core.enums;
|
|||
/**
|
||||
* 流程常量信息
|
||||
*/
|
||||
public interface ProcessConstants {
|
||||
public interface BpmnModelConstants {
|
||||
|
||||
String BPMN_FILE_SUFFIX = ".bpmn";
|
||||
|
||||
/**
|
||||
* nameapace
|
||||
* bpmn中的命名空间
|
||||
* BPMN 中的命名空间
|
||||
*
|
||||
* 这个东西有可能导致无法切换工作流程的实现
|
||||
*/
|
||||
String NAMESPASE = "http://flowable.org/bpmn";
|
||||
String NAMESPACE = "http://flowable.org/bpmn";
|
||||
|
||||
/**
|
||||
* 自定义属性 dataType
|
|
@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.handler;
|
|||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.framework.flowable.core.enums.ProcessConstants;
|
||||
import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants;
|
||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
|
@ -21,6 +21,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
|
||||
// TODO @芋艿:bpmn 分配人融合时,需要搞下这块;
|
||||
/**
|
||||
* 多实例处理类
|
||||
*/
|
||||
|
@ -45,7 +46,7 @@ public class MultiInstanceHandler {
|
|||
Set<String> candidateUserIds = new LinkedHashSet<>();
|
||||
FlowElement flowElement = execution.getCurrentFlowElement();
|
||||
if (ObjectUtil.isNotEmpty(flowElement) && flowElement instanceof UserTask userTask) {
|
||||
String dataType = userTask.getAttributeValue(ProcessConstants.NAMESPASE, ProcessConstants.PROCESS_CUSTOM_DATA_TYPE);
|
||||
String dataType = userTask.getAttributeValue(BpmnModelConstants.NAMESPACE, BpmnModelConstants.PROCESS_CUSTOM_DATA_TYPE);
|
||||
if ("USERS".equals(dataType) && CollUtil.isNotEmpty(userTask.getCandidateUsers())) {
|
||||
// 添加候选用户id
|
||||
candidateUserIds.addAll(userTask.getCandidateUsers());
|
||||
|
@ -71,4 +72,5 @@ public class MultiInstanceHandler {
|
|||
}
|
||||
return candidateUserIds;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.PageUtils;
|
||||
import cn.iocoder.yudao.framework.flowable.core.enums.ProcessConstants;
|
||||
import cn.iocoder.yudao.framework.flowable.core.enums.BpmnModelConstants;
|
||||
import cn.iocoder.yudao.framework.flowable.core.util.BpmnModelUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO;
|
||||
|
@ -122,7 +122,7 @@ public class BpmProcessDefinitionServiceImpl implements BpmProcessDefinitionServ
|
|||
// 创建 Deployment 部署
|
||||
Deployment deploy = repositoryService.createDeployment()
|
||||
.key(createReqDTO.getKey()).name(createReqDTO.getName()).category(createReqDTO.getCategory())
|
||||
.addBytes(createReqDTO.getKey() + ProcessConstants.BPMN_FILE_SUFFIX, createReqDTO.getBpmnBytes())
|
||||
.addBytes(createReqDTO.getKey() + BpmnModelConstants.BPMN_FILE_SUFFIX, createReqDTO.getBpmnBytes())
|
||||
.tenantId(TenantContextHolder.getTenantIdStr())
|
||||
.deploy();
|
||||
|
||||
|
|
Loading…
Reference in New Issue