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

import java.util.List;

/**
 * 用户任务节点预测
 *
 * @author wangli
 * @since 2023/10/10 11:29
 */
@Component
public class UserTaskForecasting extends AbstractForecast<UserTask> {
    @Override
    public Boolean support(FlowElement flowElement) {
        return flowElement instanceof UserTask;
    }

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

}
