package cn.axzo.workflow.core.service.support.forecast.impl;

import cn.axzo.workflow.core.service.support.forecast.AbstractForecast;
import org.flowable.bpmn.model.ExclusiveGateway;
import org.flowable.bpmn.model.FlowElement;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 排他网关
 *
 * @author wangli
 * @since 2023/10/11 09:57
 */
@Component
public class ExclusiveGatewayForecasting extends AbstractForecast<ExclusiveGateway> {
    @Override
    public Boolean support(FlowElement flowElement) {
        return flowElement instanceof ExclusiveGateway;
    }

    @Override
    protected List<? extends FlowElement> getOutgoing(ExclusiveGateway flowElement) {
        return flowElement.getOutgoingFlows();
    }

}
