update - 调整引擎内部引用的常量名以及常量值

This commit is contained in:
wangli 2023-07-17 09:54:47 +08:00
parent 813b2d0045
commit e01c3d4d6d
5 changed files with 12 additions and 23 deletions

View File

@ -11,12 +11,13 @@ public interface BpmConstants {
*/
String INTERNAL_EXECUTIVE_UNIT_ID = "_INTERNAL_EXECUTIVE_UNIT_ID";
String INTERNAL_START_USER_NAME = "_INTERNAL_START_USER_NAME";
String INTERNAL_END_USER_IDENTITY_ID = "_INTERNAL_END_USER_IDENTITY_ID";
String INTERNAL_END_USER_WORKSPACE_ID = "_INTERNAL_END_USER_WORKSPACE_ID";
String INTERNAL_END_USER_ID = "_INTERNAL_END_USER_ID";
String INTERNAL_END_TENANT_ID = "_INTERNAL_END_TENANT_ID";
String INTERNAL_END_USER_NAME = "_INTERNAL_END_USER_NAME";
String INTERNAL_TASK_COMMENT = "_INTERNAL_CUSTOM_TASK_COMMENT";
String PROCESS_PREFIX="Flowable";
String START_EVENT_ID="startEventNode";
String END_EVENT_ID="endEventNode";
String PROCESS_PREFIX = "Flowable";
String START_EVENT_ID = "startEventNode";
String END_EVENT_ID = "endEventNode";
String BPM_MODEL_CATEGORY = "bpm_model_category";
}

View File

@ -1,12 +0,0 @@
package cn.axzo.workflow.core.constants;
/**
* bpmn common constants
*
* @author wangli
* @since 2023/7/8 18:03
*/
public interface BpmnConstants {
String BPM_MODEL_CATEGORY = "bpm_model_category";
}

View File

@ -1,7 +1,7 @@
package cn.axzo.workflow.core.service.impl;
import cn.axzo.workflow.core.common.BpmConstants;
import cn.axzo.workflow.core.common.exception.WorkflowEngineException;
import cn.axzo.workflow.core.constants.BpmnConstants;
import cn.axzo.workflow.core.repository.entity.BpmDictDataDO;
import cn.axzo.workflow.core.repository.mapper.BpmDictDataMapper;
import cn.axzo.workflow.core.service.BpmCategoryService;
@ -27,7 +27,7 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
@Slf4j
public class BpmCategoryServiceImpl extends ServiceImpl<BpmDictDataMapper, BpmDictDataDO> implements BpmCategoryService, BpmnConstants {
public class BpmCategoryServiceImpl extends ServiceImpl<BpmDictDataMapper, BpmDictDataDO> implements BpmCategoryService, BpmConstants {
@Resource
private BpmDictDataMapper bpmDictDataMapper;

View File

@ -193,8 +193,8 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
}
Map<String, Object> variables = new HashMap<>();
variables.put(INTERNAL_END_USER_WORKSPACE_ID, dto.getTenantId());
variables.put(INTERNAL_END_USER_IDENTITY_ID, dto.getUserId());
variables.put(INTERNAL_END_TENANT_ID, dto.getTenantId());
variables.put(INTERNAL_END_USER_ID, dto.getUserId());
variables.put(INTERNAL_END_USER_NAME, dto.getUserName());
runtimeService.setVariables(instance.getProcessInstanceId(), variables);

View File

@ -261,9 +261,9 @@ public class BpmTaskServiceImpl implements BpmTaskService {
throw new WorkflowEngineException(PROCESS_INSTANCE_NOT_EXISTS);
}
Map<String, Object> variables = new HashMap<>();
variables.put(INTERNAL_END_USER_WORKSPACE_ID, taskAuditDTO.getTenantId());
variables.put(INTERNAL_END_TENANT_ID, taskAuditDTO.getTenantId());
variables.put(INTERNAL_END_USER_NAME, taskAuditDTO.getAssigneeName());
variables.put(INTERNAL_END_USER_IDENTITY_ID, taskAuditDTO.getAssigneeId());
variables.put(INTERNAL_END_USER_ID, taskAuditDTO.getAssigneeId());
runtimeService.setVariables(instance.getProcessInstanceId(), variables);
// 更新任务拓展表为不通过