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

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

import java.util.List;

/**
 * 开始节点
 *
 * @author wangli
 * @since 2023/10/10 13:55
 */
@Component
public class StartEventForecasting extends AbstractForecast<StartEvent> {

    @Override
    public Boolean support(FlowElement flowElement) {
        return flowElement instanceof StartEvent;
    }

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

}
