REQ-3502: 过滤流程按钮

This commit is contained in:
yanglin 2025-01-15 11:10:03 +08:00
parent b4c3a00336
commit b6b5267b82

View File

@ -47,7 +47,11 @@ class WorkflowTodoCardButtonInterceptor implements CardButtonInterceptor {
@Override
public DecisionValue<Boolean> isActionPerformed(ButtonV3 button) {
return DecisionValue.decide(isExecutorActionPerformed(button) || isSenderActionPerformed(button));
return DecisionValue.decide(isSystemButtonActionPerformed(button));
}
private boolean isSystemButtonActionPerformed(ButtonV3 button) {
return isExecutorActionPerformed(button) || isSenderActionPerformed(button);
}
private boolean isExecutorActionPerformed(ButtonV3 button) {
@ -83,7 +87,7 @@ class WorkflowTodoCardButtonInterceptor implements CardButtonInterceptor {
if (todo.getState() == PendingMessageStateEnum.PROCESSING)
return DecisionValue.decide(false);
// 显示失效按钮
if (isExecutorActionPerformed(button) || isSenderActionPerformed(button))
if (isSystemButtonActionPerformed(button))
return DecisionValue.notSure();
if (getWorkflowHideButtonKeys().contains(button.getCode()))
return DecisionValue.decide(false);