package cn.stylefeng.workflow.api;

import cn.stylefeng.workflow.api.entity.instance.RuntimeInstance;
import cn.stylefeng.workflow.api.entity.task.RuTask;
import cn.stylefeng.workflow.api.pojo.workflowapi.FlowApiStartRequest;
import cn.stylefeng.workflow.api.pojo.workflowapi.FlowDefinitionStartRequest;

import java.util.List;

public interface WorkflowApi {

    RuntimeInstance start(FlowApiStartRequest flowApiStartRequest);

    RuntimeInstance startByDefinitionId(FlowDefinitionStartRequest flowStartRequest);

    List<Long> getUserWaitTodoTaskInstanceIdList(Long userId);

    List<RuTask> getInstanceRunningTasks(Long instanceId, Long userId);

    RuTask getUserInstanceTask(Long instanceId);

    void finishInstanceRunningTask(List<Long> instanceIdList);

}
