package cn.stylefeng.workflow.instance.modular.manage.service;

import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.workflow.api.entity.instance.RuntimeInstance;
import cn.stylefeng.workflow.design.api.callback.ModelRemoveCallback;
import cn.stylefeng.workflow.instance.api.InstanceApi;
import cn.stylefeng.workflow.instance.api.WorkflowStatusApi;
import cn.stylefeng.workflow.instance.api.pojo.request.RuntimeInstanceRequest;
import cn.stylefeng.workflow.instance.modular.manage.pojo.request.PredictRequest;
import cn.stylefeng.workflow.instance.modular.manage.pojo.vo.PredictResponse;
import cn.stylefeng.workflow.instance.modular.manage.pojo.vo.RuntimeNodeEdgeResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface RuntimeInstanceService extends IService<RuntimeInstance>, WorkflowStatusApi, InstanceApi, ModelRemoveCallback {

    void add(RuntimeInstanceRequest runtimeInstanceRequest);

    void del(RuntimeInstanceRequest runtimeInstanceRequest);

    void edit(RuntimeInstanceRequest runtimeInstanceRequest);

    RuntimeInstance detail(RuntimeInstanceRequest runtimeInstanceRequest);

    List<RuntimeInstance> findList(RuntimeInstanceRequest runtimeInstanceRequest);

    PageResult<RuntimeInstance> findPage(RuntimeInstanceRequest runtimeInstanceRequest);

    RuntimeNodeEdgeResult getRuntimeNodeEdgeList(Long instanceId);

    List<PredictResponse> processPredict(PredictRequest predictRequest);

    List<Long> getSubFlowInstanceIdList(Long instanceId);

    RuntimeInstance getSummaryDetail(RuntimeInstanceRequest runtimeInstanceRequest);

}