提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.bpm.framework.flowable.core.enums; |
H |
2 |
|
|
3 |
import cn.hutool.core.util.ArrayUtil; |
bb2880
|
4 |
import com.iailab.framework.common.core.IntArrayValuable; |
e7c126
|
5 |
import lombok.AllArgsConstructor; |
H |
6 |
import lombok.Getter; |
bb2880
|
7 |
|
H |
8 |
import java.util.Arrays; |
e7c126
|
9 |
|
H |
10 |
/** |
|
11 |
* BPM 任务的候选人策略枚举 |
|
12 |
* |
|
13 |
* 例如说:分配给指定人审批 |
|
14 |
* |
|
15 |
* @author iailab |
|
16 |
*/ |
|
17 |
@Getter |
|
18 |
@AllArgsConstructor |
bb2880
|
19 |
public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { |
e7c126
|
20 |
|
H |
21 |
ROLE(10, "角色"), |
|
22 |
DEPT_MEMBER(20, "部门的成员"), // 包括负责人 |
|
23 |
DEPT_LEADER(21, "部门的负责人"), |
bb2880
|
24 |
MULTI_DEPT_LEADER_MULTI(23, "连续多级部门的负责人"), |
e7c126
|
25 |
POST(22, "岗位"), |
H |
26 |
USER(30, "用户"), |
|
27 |
START_USER_SELECT(35, "发起人自选"), // 申请人自己,可在提交申请时选择此节点的审批人 |
bb2880
|
28 |
START_USER(36, "发起人自己"), // 申请人自己, 一般紧挨开始节点,常用于发起人信息审核场景 |
H |
29 |
START_USER_DEPT_LEADER(37, "发起人部门负责人"), |
|
30 |
START_USER_DEPT_LEADER_MULTI(38, "发起人连续多级部门的负责人"), |
e7c126
|
31 |
USER_GROUP(40, "用户组"), |
bb2880
|
32 |
FORM_USER(50, "表单内用户字段"), |
H |
33 |
FORM_DEPT_LEADER(51, "表单内部门负责人"), |
e7c126
|
34 |
EXPRESSION(60, "流程表达式"), // 表达式 ExpressionManager |
bb2880
|
35 |
ASSIGN_EMPTY(1, "审批人为空"), |
e7c126
|
36 |
; |
bb2880
|
37 |
|
H |
38 |
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmTaskCandidateStrategyEnum::getStrategy).toArray(); |
e7c126
|
39 |
|
H |
40 |
/** |
|
41 |
* 类型 |
|
42 |
*/ |
|
43 |
private final Integer strategy; |
|
44 |
/** |
|
45 |
* 描述 |
|
46 |
*/ |
|
47 |
private final String description; |
|
48 |
|
|
49 |
public static BpmTaskCandidateStrategyEnum valueOf(Integer strategy) { |
|
50 |
return ArrayUtil.firstMatch(o -> o.getStrategy().equals(strategy), values()); |
|
51 |
} |
|
52 |
|
bb2880
|
53 |
@Override |
H |
54 |
public int[] array() { |
|
55 |
return ARRAYS; |
|
56 |
} |
|
57 |
|
e7c126
|
58 |
} |