反序列化问题。
This commit is contained in:
parent
1e9fcfb993
commit
aac8069e8c
@ -15,16 +15,16 @@ public class GatewayNodePanelVariables extends BaseNodePanelVariables {
|
|||||||
description = "网关类型",
|
description = "网关类型",
|
||||||
required = true,
|
required = true,
|
||||||
enumValues = {
|
enumValues = {
|
||||||
"EXCLUSIVE_GATEWAY", // 排他网关
|
"exclusiveGateway",
|
||||||
"PARALLEL_GATEWAY", // 并行网关
|
"parallelGateway", // 并行网关
|
||||||
"INCLUSIVE_GATEWAY" // 包容网关
|
"inclusiveGateway" // 包容网关
|
||||||
},
|
},
|
||||||
enumNames = {
|
enumNames = {
|
||||||
"排他网关",
|
"排他网关",
|
||||||
"并行网关",
|
"并行网关",
|
||||||
"包容网关"
|
"包容网关"
|
||||||
},
|
},
|
||||||
defaultValue = "EXCLUSIVE_GATEWAY"
|
defaultValue = "exclusiveGateway"
|
||||||
)
|
)
|
||||||
private String gatewayType;
|
private String gatewayType;
|
||||||
}
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package com.qqchen.deploy.backend.workflow.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum GatewayTypeEnums {
|
||||||
|
|
||||||
|
|
||||||
|
EXCLUSIVE_GATEWAY("exclusiveGateway", "排他网关"),
|
||||||
|
PARALLEL_GATEWAY("parallelGateway", "并行网关"),
|
||||||
|
INCLUSIVE_GATEWAY("inclusiveGateway", "包容网关");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类编码
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类名称
|
||||||
|
*/
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
GatewayTypeEnums(String code, String name) {
|
||||||
|
this.code = code;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GatewayTypeEnums fromCode(String code) {
|
||||||
|
for (GatewayTypeEnums status : GatewayTypeEnums.values()) {
|
||||||
|
if (status.getCode().equals(code)) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException("Invalid gateway type enums code: " + code);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user