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.RuntimeNode;
import cn.stylefeng.workflow.instance.api.RuntimeNodeApi;
import cn.stylefeng.workflow.instance.modular.manage.pojo.request.RuntimeNodeRequest;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface RuntimeNodeService extends IService<RuntimeNode>, RuntimeNodeApi {

    void add(RuntimeNodeRequest runtimeNodeRequest);

    void del(RuntimeNodeRequest runtimeNodeRequest);

    void edit(RuntimeNodeRequest runtimeNodeRequest);

    RuntimeNode detail(RuntimeNodeRequest runtimeNodeRequest);

    List<RuntimeNode> findList(RuntimeNodeRequest runtimeNodeRequest);

    PageResult<RuntimeNode> findPage(RuntimeNodeRequest runtimeNodeRequest);

    void cleanRuntimeNodeAndEdges(Long instanceId, Long runtimeNodeId);

    List<RuntimeNode> getInstanceFinishedNodeList(RuntimeNodeRequest runtimeNodeRequest);

    RuntimeNode getInstanceRuntimeNodeByNodeId(Long instanceId, Long nodeId);

}