package com.leanwo.activiti.service.base;

import java.util.List;

import com.leanwo.activiti.dto.BaseResponse;
import com.leanwo.activiti.dto.manage.ProcessInstanceDocRequest;
import com.leanwo.activiti.dto.manage.ProcessInstanceDocResponse;
import com.leanwo.activiti.dto.manage.TaskDocInfo;

public interface DocManagmentService {
	
	/**
	 * 查询单据流程实例信息
	 * @param processInstanceDocRequest
	 * @return
	 */
	ProcessInstanceDocResponse query(ProcessInstanceDocRequest processInstanceDocRequest);

	/**
	 * 根据流程实例Id查询任务信息
	 * @param processInstanceId
	 * @return
	 */
	List<TaskDocInfo> listTasks(String processInstanceId);
	
	/**
	 * 根据流程实例Id查询历史任务信息
	 * @param processInstanceId
	 * @return
	 */
	List<TaskDocInfo> listHistoricTasks(String processInstanceId);

	/**
	 * 修改流程实例Id的状态
	 * @param changeType suspend:暂停, activate: 激活, delete: 删除
	 * @param processInstanceId  流程实例Id
	 * @param reason 原因
	 * @return
	 */
	BaseResponse changeProcessInstance(String changeType, String processInstanceId, String reason);
}
