田源
2025-01-16 a13255b4129ee8a7a7b7e1ecd8e02dd2c78f7c17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
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;
}