package cn.stylefeng.workflow.instance.api;

import cn.stylefeng.workflow.api.entity.instance.RuntimeNode;

import java.util.List;

public interface RuntimeNodeApi {

    RuntimeNode getRuntimeNodeById(Long runtimeNodeId);

    RuntimeNode saveRuntimeNode(RuntimeNode runtimeNode);

    RuntimeNode getStartRuntimeNode(Long instanceId);

    void updateRuntimeNode(RuntimeNode runtimeNode);

    void saveOrUpdateRuntimeNode(RuntimeNode runtimeNode);

    List<RuntimeNode> getAlreadyFinishedRuntimeNode(Long instanceId, Long runtimeNodeId);

    RuntimeNode getRuntimeNodeByNodeId(Long instanceId, Long nodeId);

    void closeInstanceRuntimeNodes(Long instanceId);

}
