update - 调整事件中 payload 模型,新增模型对应的消息模板配置信息

This commit is contained in:
wangli 2023-12-07 17:19:22 +08:00
parent 1b4e681936
commit dd1abd11cf
2 changed files with 17 additions and 20 deletions

View File

@ -477,9 +477,10 @@ public class BpmnProcessTaskServiceImpl implements BpmnProcessTaskService {
runtimeService.deleteMultiInstanceExecution(task.getExecutionId(), false);
taskService.deleteTask(task.getId(), dto.getAdvice());
if (Objects.nonNull(currentNumberOfInstances) && currentNumberOfInstances == 1) {
// FIXME 这个拒绝的功能太过于业务定制了, 根本无法使用用户节点配置的完成条件, 后续慢慢熟悉后调整
// if (Objects.nonNull(currentNumberOfInstances) && currentNumberOfInstances == 1) {
finishProcessInstance(dto, instance);
}
// }
} else {
finishProcessInstance(dto, instance);
}

View File

@ -179,15 +179,10 @@ public class RocketMqMessagePushEventListener implements BpmnMessagePushEventLis
variables.put(VAR_PROCESS_END_TIME, sdf.format(processInstance.getEndTime()));
}
variables.put(VAR_PROCESS_RESULT, processInstance.getResult().getDesc());
if (!StringUtils.hasLength(event.getTaskId())) {
return variables;
} else {
if (StringUtils.hasLength(event.getTaskId())) {
List<HistoricTaskInstance> tasks =
historyService.createHistoricTaskInstanceQuery().taskId(event.getTaskId()).list();
if (CollectionUtils.isEmpty(tasks)) {
return variables;
}
if (!CollectionUtils.isEmpty(tasks)) {
// 应该只有 1 , 但是为了防止有多个, 这里只取第一个
List<BpmnTaskDelegateAssigner> assigners =
(List<BpmnTaskDelegateAssigner>) originVariables.getOrDefault(INTERNAL_TASK_RELATION_ASSIGNEE_LIST_INFO_SNAPSHOT + tasks.get(0).getTaskDefinitionKey(), Collections.emptyList());
@ -201,6 +196,7 @@ public class RocketMqMessagePushEventListener implements BpmnMessagePushEventLis
// 操作类型 同意驳回加签评论转交等, 暂时不实现, 这里设置有很多问题
variables.put(VAR_OPERATOR_TYPE, "");
}
}
categoryService.getById(Long.valueOf(processInstance.getCategory())).ifPresent(category -> {
variables.put(VAR_BUSINESS_NAME, category.getLabel());