update - 在发送待办时,透传用于查询能用按钮的前置数据

This commit is contained in:
wangli 2024-04-23 16:29:35 +08:00
parent e382aee3bc
commit 250110ff91

View File

@ -153,20 +153,20 @@ public class RocketMqMessagePushEventListener extends AbstractBpmnEventListener<
PROCESS_PUSH_PENDING, event, collectionVariable(event));
List<BpmnButtonMetaInfo> buttons = new ArrayList<>();
// TODO 发送待办时, 计算当前人能操作的按钮有哪些?
// 发送待办时, 计算当前人能操作的按钮有哪些?
if (StringUtils.hasText(event.getProcessDefinitionId())) {
BpmnTaskDelegateAssigner bpmnTaskDelegateAssigner = event.getAssigners().get(0);
Process process = getContext().getProcess(() -> ProcessDefinitionUtil.getBpmnModel(event.getProcessDefinitionId()).getMainProcess());
BpmnMetaParserHelper.getButtonConfig(process, event.getCurrentTaskDefinitionKey())
.ifPresent(buttonConf -> {
BpmnProcessInstanceVO instance = getContext().getInstanceVO(() -> getBpmnProcessInstanceVO(event));
if (bpmnTaskDelegateAssigner.comparePersonIdToOther(instance.getStartUserId())) {
if (bpmnTaskDelegateAssigner.comparePersonIdToOther(instance.getInitiator())) {
buttons.addAll(buttonConf.getInitiator());
}
buttons.addAll(buttonConf.getCurrent());
});
}
dto.setButtons(buttons);
sendMessageQueue(dto, PROCESS_PUSH_PENDING);
}
if (log.isDebugEnabled()) {