feature(improve) - 优化 MQ payload 的大小

This commit is contained in:
wangli 2026-03-24 10:08:35 +08:00
parent 7ebadb9dcd
commit 5c46edd2e5
2 changed files with 11 additions and 2 deletions

View File

@ -22,7 +22,7 @@ import java.util.Objects;
@Component
@Slf4j
public class EngineActivityStartEventListener implements ExecutionListener {
private static final String EVENT_NAME = "activityStart:";
public static final String EVENT_NAME = "activityStart:";
@Resource
ObjectProvider<List<BpmnActivityEventListener>> activityListeners;

View File

@ -3,6 +3,7 @@ package cn.axzo.workflow.core.listener;
import cn.axzo.workflow.common.constant.BpmnConstants;
import cn.axzo.workflow.core.common.context.OperationContext;
import cn.axzo.workflow.core.conf.SupportRefreshProperties;
import cn.axzo.workflow.core.engine.listener.EngineActivityStartEventListener;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.flowable.form.api.FormInfo;
@ -100,6 +101,7 @@ public abstract class AbstractBpmnEventListener<T extends OperationContext> impl
// 定义需要移除的前缀列表
List<String> prefixesToRemove = Arrays.asList(
BpmnConstants.CREATE_INSTANCE_PARAMS,
BpmnConstants.INTERNAL_TASK_RELATION_ASSIGNEE_INFO,
BpmnConstants.INTERNAL_ACTIVITY_RELATION_ASSIGNEE_LIST_INFO_SNAPSHOT,
BpmnConstants.TASK_COMPLETE_OPERATION_TYPE,
@ -123,7 +125,14 @@ public abstract class AbstractBpmnEventListener<T extends OperationContext> impl
BpmnConstants.INTERNAL_SPECIFY_NEXT_APPROVER,
BpmnConstants.NUMBER_OF_INSTANCES,
BpmnConstants.MULTI_INSTANCE_LOOP_COUNTER,
BpmnConstants.CLOSE_PROCESS_ASSIGNER
BpmnConstants.CLOSE_PROCESS_ASSIGNER,
BpmnConstants.SIGN_BIZ_CUSTOM_DOC_ADD_ORDER_TYPE,
BpmnConstants.SUPPORT_UPGRADE_VARIABLE,
"nrOfActiveInstances",
"nrOfCompletedInstances",
"assigneeName",
EngineActivityStartEventListener.EVENT_NAME
// BpmnConstants.SIGN_PROCESS_ENABLE_DOC_IDS
);
if (!CollectionUtils.isEmpty(removeVariableKey)) {
removeVariableKey.forEach(originVariables::remove);