198 lines
4.4 KiB
Java
198 lines
4.4 KiB
Java
package com.cm.inspection.service.process;
|
||
|
||
import com.alibaba.fastjson.JSONArray;
|
||
import com.cm.common.result.SuccessResult;
|
||
import com.cm.common.result.SuccessResultData;
|
||
import org.activiti.engine.history.HistoricProcessInstance;
|
||
import org.activiti.engine.history.HistoricTaskInstance;
|
||
import org.activiti.engine.runtime.ProcessInstance;
|
||
import org.activiti.engine.task.Task;
|
||
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
/**
|
||
* When you feel like quitting. Think about why you started
|
||
* 当你想要放弃的时候,想想当初你为何开始
|
||
*
|
||
* @ClassName: IDeployProcessService
|
||
* @Description: 部署流程
|
||
* @Author: WangGeng
|
||
* @Date: 2020/3/23 18:36
|
||
* @Version: 1.0
|
||
**/
|
||
public interface IProcessService {
|
||
|
||
String CHECK_SELF_PROCESS = "checkSelfProcess";
|
||
|
||
/**
|
||
* 部署流程
|
||
*
|
||
* @param processName 流程名称
|
||
* @param processSummary 流程说明
|
||
*/
|
||
void deployProcess(String processName, String processSummary);
|
||
|
||
/**
|
||
* 启动流程
|
||
*
|
||
* @param processName 流程名称
|
||
* @param businessKey 业务主键
|
||
* @param params 参数
|
||
* @return 流程主键
|
||
*/
|
||
String startProcess(String processName, String businessKey, Map<String, Object> params);
|
||
|
||
/**
|
||
* 任务列表(通过执行人)
|
||
*
|
||
* @param assignee
|
||
* @return
|
||
*/
|
||
List<Task> listTaskByAssignee(String assignee);
|
||
|
||
/**
|
||
* 任务列表(通过执行人和变量Key)
|
||
*
|
||
* @param assignee
|
||
* @param key
|
||
* @return
|
||
*/
|
||
List<Task> listTaskByAssigneeAndVariablesKey(String assignee, String key);
|
||
|
||
/**
|
||
* 获取任务(通过业务主键)
|
||
*
|
||
* @param listTask
|
||
* @param businessKey 业务主键,格式:业务:id
|
||
* @return
|
||
*/
|
||
Task getTaskByBusinessKey(List<Task> listTask, String businessKey);
|
||
|
||
/**
|
||
* 获取任务(通过执行人和业务主键)
|
||
*
|
||
* @param assignee
|
||
* @param businessKey
|
||
* @return
|
||
*/
|
||
Task getTaskByAssigneeAndBusinessKey(String assignee, String businessKey);
|
||
|
||
/**
|
||
* 获取任务(通过流程ID)
|
||
*
|
||
* @param processId
|
||
* @return
|
||
*/
|
||
Task getTaskByProcessId(String processId);
|
||
|
||
/**
|
||
* 获取任务(通过流程ID)
|
||
*
|
||
* @param listTask
|
||
* @param processId
|
||
* @return
|
||
*/
|
||
Task getTaskByProcessId(List<Task> listTask, String processId);
|
||
|
||
/**
|
||
* 获取任务(通过执行人和流程ID)
|
||
*
|
||
* @param assignee
|
||
* @param processId
|
||
* @return
|
||
*/
|
||
Task getTaskByAssigneeAndProcessId(String assignee, String processId);
|
||
|
||
/**
|
||
* 获取任务(通过执行人和变量名)
|
||
*
|
||
* @param assignee
|
||
* @param key
|
||
* @param value
|
||
* @return
|
||
*/
|
||
Task getTaskByAssigneeAndVariableKeyAndValue(String assignee, String key, Object value);
|
||
|
||
/**
|
||
* 设置任务变量
|
||
*
|
||
* @param taskId
|
||
* @param variables
|
||
*/
|
||
void setTaskVariablesByTaskId(String taskId, Map<String, Object> variables);
|
||
|
||
/**
|
||
* 设置任务变量
|
||
*
|
||
* @param taskId
|
||
* @param key
|
||
* @param value
|
||
*/
|
||
void setTaskVariableByTaskId(String taskId, String key, Object value);
|
||
|
||
/**
|
||
* 获取任务变量
|
||
*
|
||
* @param taskId
|
||
* @return
|
||
*/
|
||
Map<String, Object> getTaskVariablesByTaskId(String taskId);
|
||
|
||
/**
|
||
* 获取任务变量(通过键、值)
|
||
*
|
||
* @param taskId
|
||
* @param key
|
||
* @param value
|
||
* @return
|
||
*/
|
||
Object getTaskVariableByTaskId(String taskId, String key);
|
||
|
||
/**
|
||
* 删除任务变量
|
||
*
|
||
* @param taskId
|
||
* @param keys
|
||
*/
|
||
void removeTaskVariablesByTaskId(String taskId, List<String> keys);
|
||
|
||
/**
|
||
* 删除任务变量
|
||
*
|
||
* @param taskId
|
||
* @param key
|
||
*/
|
||
void removeTaskVariableByTaskId(String taskId, String key);
|
||
|
||
/**
|
||
* 完成案件(通过taskId)
|
||
*
|
||
* @param taskId
|
||
* @param params
|
||
*/
|
||
void saveTaskCompleteByTaskId(String taskId, Map<String, Object> params);
|
||
|
||
/**
|
||
* 流程实例状态(通过流程ID)
|
||
*
|
||
* @param processId
|
||
* @return
|
||
*/
|
||
ProcessInstance getProcessInstanceStatusByProcessId(String processId);
|
||
|
||
/**
|
||
* 历史流程实例列表
|
||
*
|
||
* @return
|
||
*/
|
||
List<HistoricProcessInstance> listHistoricProcessInstance();
|
||
|
||
/**
|
||
* 历史任务实例列表
|
||
*
|
||
* @return
|
||
*/
|
||
List<HistoricTaskInstance> listHistoricTaskInstance();
|
||
|
||
} |