package com.vci.web.service;
|
|
import com.vci.corba.wf.data.TasksAssignedInfo;
|
import com.vci.starter.web.exception.VciBaseException;
|
import com.vci.dto.ProcessStartConfigDTO;
|
import com.vci.pagemodel.ProcessUserVO;
|
import org.springframework.web.multipart.MultipartFile;
|
|
import java.util.Collection;
|
import java.util.Date;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 流程执行相关服务
|
* @author weidy
|
*
|
*/
|
public interface WebProcessCommandServiceI {
|
|
/**
|
* 部署流程
|
* @param name 流程名称
|
* @param type 流程分类
|
* @param key 流程key
|
* @param xmlContext xml内容
|
* @return
|
* @throws VciBaseException
|
*/
|
boolean deploy(String name, String type, String key, String xmlContext) throws VciBaseException;
|
|
/**
|
* 启动流程
|
* @param config 启动流程相关配置
|
* @param processNodeUsers 各个节点的负责人信息
|
* @param variablesInfo 相关变量
|
* @throws VciBaseException
|
*/
|
void startProcess(ProcessStartConfigDTO config, Map<String, List<ProcessUserVO>> processNodeUsers, Map<String, String> variablesInfo) throws VciBaseException;
|
|
/**
|
* 执行流程任务
|
* @param taskIds 任务主键,多个任务使用逗号分隔
|
* @param outCome 路由
|
* @param note 审批意见
|
* @param nextTaskUser 下一任务的处理人,如果发起流程的时候没有设置处理人时才设置
|
* @throws VciBaseException
|
*/
|
void completeTasks(String taskIds, String outCome, String note, List<ProcessUserVO> nextTaskUser) throws VciBaseException;
|
|
/**
|
* 转派任务
|
* @param taskOids 任务主键
|
* @param userIds 新的用户的用户名,只能是一个用户
|
* @throws VciBaseException
|
*/
|
void setPrincipal(String taskOids, String userIds) throws VciBaseException;
|
|
|
/**
|
* 开始代理
|
* @param userId 用户名
|
* @param startDate 开始时间,可以为空;默认当前时间
|
* @param endDate 结束时间,可以为空;默认永久生效
|
* @param isNowEnable 是否立即生效---都设置为true
|
* @throws VciBaseException
|
*/
|
void beginProxy(String userId, Date startDate, Date endDate, boolean isNowEnable) throws VciBaseException;
|
|
/**
|
* 关闭代理
|
* @throws VciBaseException
|
*/
|
void endProxy() throws VciBaseException;
|
|
/**
|
* 获取当前用户的流程代理人
|
* @return
|
* @throws VciBaseException
|
*/
|
TasksAssignedInfo getProxy() throws VciBaseException;
|
|
|
/**
|
* 终止流程
|
* @param executionId 流程执行实例id
|
* @param note
|
*/
|
void endProcess(String executionId, String note) throws VciBaseException;
|
|
/***
|
* 挂起流程
|
* @param executionId 流程执行实例
|
* @param note
|
* @throws VciBaseException
|
*/
|
void suspendProcess(String executionId, String note) throws VciBaseException;
|
|
/**
|
* 恢复流程
|
* @param executionId 流程主键
|
* @throws VciBaseException
|
*/
|
void resumeProcess(String executionId) throws VciBaseException;
|
|
/**
|
* 发起流程时校验属性是否符合要求
|
* @param oids 主键
|
* @param btmType 业务类型
|
* @param properties 属性名,逗号分隔
|
* @param propertieValues 属性的值
|
* @param primaryKeyName 主键的属性名称
|
* @throws VciBaseException
|
*/
|
void checkAttributesOnStartProcess(String oids, String btmType, String properties, String propertieValues, String primaryKeyName) throws VciBaseException;
|
|
/**
|
* 批量终止流程
|
* @param executionIds 流程的执行主键
|
* @param note 终止原因
|
* @throws VciBaseException
|
*/
|
void batchEndProcess(Collection<String> executionIds, String note) throws VciBaseException;
|
|
/**
|
* 添加流程审批意见文件
|
* @param taskOids 流程任务的主键
|
* @param file 文件的数据
|
* @param originalFilename 文件的名称
|
* @throws VciBaseException 在查询流程任务的信息或者上传文件错误时会抛出异常
|
*/
|
void uploadAuditSuggestFile(String taskOids, MultipartFile file, String originalFilename) throws VciBaseException;
|
}
|