package com.mortals.xhx.module.task.service;

import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.common.pdu.flow.*;
import com.mortals.xhx.feign.processinstance.ProcessCommonReq;
import com.mortals.xhx.feign.processinstance.ProcessDeleteReq;
import com.mortals.xhx.feign.processinstance.ProcessStopReq;
import com.mortals.xhx.feign.task.*;
import com.mortals.xhx.module.flowable.model.FlowableDefinitionEntity;
import com.mortals.xhx.module.task.model.TaskProcessEntity;
import com.mortals.xhx.module.task.model.TaskProcessQuery;
import com.mortals.xhx.module.task.model.TaskTodoEntity;

import java.util.List;
import java.util.Map;

/**
 * <p>Title: 流程实例表</p>
 * <p>Description: TaskProcessService service接口 </p>
 * <p>Copyright: Copyright &reg;  </p>
 *
 * @version 1.0.0
 */

public interface TaskProcessService extends ICRUDService<TaskProcessEntity,Long> {

    Result<TaskProcessEntity> getProcessList(TaskProcessQuery query, PageInfo pageInfo, Context context);

    List<FlowViewerPdu> getFlowViewer(String procInsId);

    Map<String, Object> getProcessVariables(String taskId);

    FlowNextPdu getNextFlowNode(String data, Context context);

    Result<FlowTaskPdu> getFinishList(TaskProcessQuery query, PageInfo pageInfo, Context context);

    Map<String, Object> flowRecord(String procInsId, String deployId, Context context);

    String stopProcess(ProcessStopReq processStopReq, Context context);

    String complete(CompleteTaskReq completeTaskReq, Context context);

    String reject(RejectTaskReq rejectTaskReq, Context context);

    String taskReturn(ReturnTaskReq returnTaskReq, Context context);

    String addSignTask(AddSignTaskReq req, Context context);

    String delete(ProcessDeleteReq processDeleteReq, Context context);

    String claim(FlowTaskVoPdu flowTaskVoPdu, Context context);

    String unClaim(FlowTaskVoPdu flowTaskVoPdu, Context context);

    String delegateTask(DelegateTaskReq delegateTaskReq, Context context);

    String assignTask(TurnTaskReq turnTaskReq, Context context);

    List<FlowUserTaskPdu> getReturnList(CommonTaskReq commonTaskReq, Context context);


    String processReadImage(ProcessCommonReq processCommonReq, Context context);
}