package cn.axzo.workflow.server.controller.delegate;

import cn.axzo.workflow.common.enums.ApproverSpecifyEnum;
import cn.axzo.workflow.common.exception.WorkflowEngineException;
import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskDelegateAssigner;
import org.flowable.bpmn.model.FlowElement;
import org.flowable.engine.delegate.DelegateExecution;
import org.springframework.stereotype.Component;

import java.util.List;

import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_USER_TASK_TYPE_NOT_SUPPORT;


/**
 * 未不实现
 * 基于"发起人多级主管"查询审批人
 *
 * @author wangli
 * @since 2023/11/16 11:42
 */
@Deprecated // 方便识别未使用的审批人选择器
@Component
public class BasedInitiatorLeaderRecursionTaskAssigneeSelector extends AbstractBpmnTaskAssigneeSelector {
    @Override
    public String getType() {
        return ApproverSpecifyEnum.initiatorLeaderRecursion.getType();
    }

    @Override
    public List<BpmnTaskDelegateAssigner> select(FlowElement flowElement, DelegateExecution execution,
                                                 Boolean throwException) {
        throw new WorkflowEngineException(ENGINE_USER_TASK_TYPE_NOT_SUPPORT);
    }

}
