xiangpei
2025-03-06 e7243b4e61a96249bbe17173682a243c9a591609
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
package com.ycl.service;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ycl.common.core.domain.AjaxResult;
import com.ycl.domain.dto.FlowProcDefDto;
 
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
 
/**
 * @author Tony
 * @date 2021-04-03 14:41
 */
public interface IFlowDefinitionService {
 
    boolean exist(String processDefinitionKey);
 
 
    /**
     * 流程定义列表
     *
     * @param pageNum  当前页码
     * @param pageSize 每页条数
     * @return 流程定义分页列表数据
     */
    Page<FlowProcDefDto> list(String name, Integer pageNum, Integer pageSize);
 
    /**
     * 导入流程文件
     * 当每个key的流程第一次部署时,指定版本为1。对其后所有使用相同key的流程定义,
     * 部署时版本会在该key当前已部署的最高版本号基础上加1。key参数用于区分流程定义
     * @param name
     * @param category
     * @param in
     */
    void importFile(String name, String category, InputStream in);
 
    /**
     * 读取xml
     * @param deployId
     * @return
     */
    AjaxResult readXml(String deployId) throws IOException;
 
    /**
     * 根据流程定义ID启动流程实例
     *
     * @param procDefId
     * @param variables
     * @return
     */
 
    AjaxResult startProcessInstanceById(String procDefId, Map<String, Object> variables);
 
 
    /**
     * 激活或挂起流程定义
     *
     * @param state    状态
     * @param deployId 流程部署ID
     */
    void updateState(Integer state, String deployId);
 
 
    /**
     * 删除流程定义
     *
     * @param deployId 流程部署ID act_ge_bytearray 表中 deployment_id值
     */
    void delete(String deployId);
 
 
    /**
     * 读取图片文件
     * @param deployId
     * @return
     */
    InputStream readImage(String deployId);
}