update - 在发送待办时,透传用于查询能用按钮的前置数据
This commit is contained in:
parent
e382aee3bc
commit
250110ff91
@ -153,20 +153,20 @@ public class RocketMqMessagePushEventListener extends AbstractBpmnEventListener<
|
|||||||
PROCESS_PUSH_PENDING, event, collectionVariable(event));
|
PROCESS_PUSH_PENDING, event, collectionVariable(event));
|
||||||
|
|
||||||
List<BpmnButtonMetaInfo> buttons = new ArrayList<>();
|
List<BpmnButtonMetaInfo> buttons = new ArrayList<>();
|
||||||
// TODO 发送待办时, 计算当前人能操作的按钮有哪些?
|
// 发送待办时, 计算当前人能操作的按钮有哪些?
|
||||||
if (StringUtils.hasText(event.getProcessDefinitionId())) {
|
if (StringUtils.hasText(event.getProcessDefinitionId())) {
|
||||||
BpmnTaskDelegateAssigner bpmnTaskDelegateAssigner = event.getAssigners().get(0);
|
BpmnTaskDelegateAssigner bpmnTaskDelegateAssigner = event.getAssigners().get(0);
|
||||||
Process process = getContext().getProcess(() -> ProcessDefinitionUtil.getBpmnModel(event.getProcessDefinitionId()).getMainProcess());
|
Process process = getContext().getProcess(() -> ProcessDefinitionUtil.getBpmnModel(event.getProcessDefinitionId()).getMainProcess());
|
||||||
BpmnMetaParserHelper.getButtonConfig(process, event.getCurrentTaskDefinitionKey())
|
BpmnMetaParserHelper.getButtonConfig(process, event.getCurrentTaskDefinitionKey())
|
||||||
.ifPresent(buttonConf -> {
|
.ifPresent(buttonConf -> {
|
||||||
BpmnProcessInstanceVO instance = getContext().getInstanceVO(() -> getBpmnProcessInstanceVO(event));
|
BpmnProcessInstanceVO instance = getContext().getInstanceVO(() -> getBpmnProcessInstanceVO(event));
|
||||||
if (bpmnTaskDelegateAssigner.comparePersonIdToOther(instance.getStartUserId())) {
|
if (bpmnTaskDelegateAssigner.comparePersonIdToOther(instance.getInitiator())) {
|
||||||
buttons.addAll(buttonConf.getInitiator());
|
buttons.addAll(buttonConf.getInitiator());
|
||||||
}
|
}
|
||||||
buttons.addAll(buttonConf.getCurrent());
|
buttons.addAll(buttonConf.getCurrent());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
dto.setButtons(buttons);
|
||||||
sendMessageQueue(dto, PROCESS_PUSH_PENDING);
|
sendMessageQueue(dto, PROCESS_PUSH_PENDING);
|
||||||
}
|
}
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user