package cn.stylefeng.workflow.instance.api;

import cn.stylefeng.workflow.api.entity.instance.RuntimeInstance;
import cn.stylefeng.workflow.api.enums.NodeStatusEnum;
import cn.stylefeng.workflow.instance.api.pojo.request.*;

public interface WorkflowControlApi {

    RuntimeInstance start(WorkflowStartRequest workflowStartRequest);

    void finishNode(WorkflowFinishNodeRequest workflowFinishNodeRequest);

    void suspend(WorkflowChangeStatusRequest workflowSuspendRequest);

    void active(WorkflowChangeStatusRequest workflowSuspendRequest);

    void invalid(WorkflowChangeStatusRequest workflowSuspendRequest);

    void turn(WorkflowTurnRequest workflowTurnRequest);

    void reject(WorkflowChangeStatusRequest workflowSuspendRequest);

    void updateRuntimeNodeStatus(Long instanceId, NodeStatusEnum nodeStatusEnum);

    void saveDraft(WorkflowSaveDraftRequest workflowSaveDraftRequest);

}
