update - 调整 Activity 事件发送 MQ 的 messageKey
This commit is contained in:
parent
3f9dfdd133
commit
df4a3ec355
@ -57,7 +57,7 @@ public class EngineTaskEventListener implements TaskListener {
|
||||
}
|
||||
});
|
||||
stopWatch.stop();
|
||||
log.info(stopWatch.shortSummary());
|
||||
log.info("StopWatch '" + stopWatch.currentTaskName() + "': running time = " + stopWatch.getTotalTimeSeconds() + " s");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@ public class RocketMqBpmActivityEventListener implements BpmnActivityEventListen
|
||||
eventProducer.send(Event.builder()
|
||||
.shardingKey(dto.getProcessInstanceId())
|
||||
.eventCode(eventEnum.getEventCode())
|
||||
.targetId(dto.getActivityId())
|
||||
.targetId(dto.getProcessInstanceId())
|
||||
.targetType(eventEnum.getTag())
|
||||
.data(dto)
|
||||
.build());
|
||||
|
||||
@ -33,6 +33,7 @@ import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.BIZ_ORG_RELATION;
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.BPM_MODEL_CATEGORY;
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_ACTIVITY_RELATION_ASSIGNEE_LIST_INFO_SNAPSHOT;
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_DELETE_PROCESS_FLAG;
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_END_TENANT_ID;
|
||||
@ -237,7 +238,7 @@ public class RocketMqMessagePushEventListener implements BpmnMessagePushEventLis
|
||||
}
|
||||
}
|
||||
|
||||
categoryService.getById(Long.valueOf(processInstance.getCategory())).ifPresent(category -> {
|
||||
categoryService.get(BPM_MODEL_CATEGORY, processInstance.getCategory()).ifPresent(category -> {
|
||||
variables.put(VAR_BUSINESS_NAME, category.getLabel());
|
||||
});
|
||||
|
||||
|
||||
@ -59,6 +59,8 @@ public class BpmnProcessInstanceController implements ProcessInstanceApi {
|
||||
private BpmnProcessInstanceService bpmnProcessInstanceService;
|
||||
@Value("${spring.profiles.active}")
|
||||
private String profile;
|
||||
@Value("${workflow.sendDingTalk:true}")
|
||||
private Boolean sendDingTalk;
|
||||
|
||||
/**
|
||||
* 我发起的审批列表
|
||||
@ -87,7 +89,9 @@ public class BpmnProcessInstanceController implements ProcessInstanceApi {
|
||||
} catch (Exception e) {
|
||||
String errorMsg = Objects.nonNull(e.getCause()) ? e.getCause().getMessage() : e.getMessage();
|
||||
LogUtil.error(LogUtil.ErrorType.ERROR_BUSINESS, "发起审核createProcessInstance===>>>异常:{}", errorMsg);
|
||||
DingTalkUtils.sendDingTalk(profile, dto, e);
|
||||
if (sendDingTalk) {
|
||||
DingTalkUtils.sendDingTalk(profile, dto, e);
|
||||
}
|
||||
return CommonResponse.fail(errorMsg);
|
||||
}
|
||||
stopWatch.stop();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user