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.ServiceTask;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 服务任务 [抄送节点使用的是该 task 类型]
 *
 * @author wangli
 * @since 2023/11/28 15:16
 */
@Component
public class ServiceTaskForecasting extends AbstractForecast<ServiceTask> {
    @Override
    public Boolean support(FlowElement flowElement) {
        return flowElement instanceof ServiceTask;
    }

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

}
