提交 | 用户 | 时间
|
bb2880
|
1 |
package com.iailab.module.bpm.enums.definition; |
H |
2 |
|
|
3 |
import cn.hutool.core.util.ArrayUtil; |
|
4 |
import com.iailab.framework.common.core.IntArrayValuable; |
|
5 |
import lombok.AllArgsConstructor; |
|
6 |
import lombok.Getter; |
|
7 |
|
|
8 |
import java.util.Arrays; |
|
9 |
|
|
10 |
/** |
|
11 |
* 仿钉钉的流程器设计器条件节点的条件类型 |
|
12 |
* |
|
13 |
* @author hou |
|
14 |
*/ |
|
15 |
@Getter |
|
16 |
@AllArgsConstructor |
|
17 |
public enum BpmSimpleModeConditionType implements IntArrayValuable { |
|
18 |
|
|
19 |
EXPRESSION(1, "条件表达式"), |
|
20 |
RULE(2, "条件规则"); |
|
21 |
|
|
22 |
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModeConditionType::getType).toArray(); |
|
23 |
|
|
24 |
private final Integer type; |
|
25 |
|
|
26 |
private final String name; |
|
27 |
|
|
28 |
public static BpmSimpleModeConditionType valueOf(Integer type) { |
|
29 |
return ArrayUtil.firstMatch(nodeType -> nodeType.getType().equals(type), values()); |
|
30 |
} |
|
31 |
|
|
32 |
@Override |
|
33 |
public int[] array() { |
|
34 |
return ARRAYS; |
|
35 |
} |
|
36 |
} |