修复json格式parser没有对language设置的bug

This commit is contained in:
everywhere.z 2024-05-08 16:15:43 +08:00
parent 65240fb2b5
commit 09aa29329d
1 changed files with 4 additions and 2 deletions

View File

@ -205,7 +205,7 @@ public class ParserHelper {
// 当存在<nodes>节点定义时解析node节点
if (flowJsonNode.get(FLOW).has(NODES)) {
Iterator<JsonNode> nodeIterator = flowJsonNode.get(FLOW).get(NODES).get(NODE).elements();
String id, name, clazz, script, type, file;
String id, name, clazz, script, type, file, language;
while ((nodeIterator.hasNext())) {
JsonNode nodeObject = nodeIterator.next();
id = nodeObject.get(ID).textValue();
@ -214,6 +214,7 @@ public class ParserHelper {
type = nodeObject.hasNonNull(TYPE) ? nodeObject.get(TYPE).textValue() : null;
script = nodeObject.hasNonNull(VALUE) ? nodeObject.get(VALUE).textValue() : "";
file = nodeObject.hasNonNull(FILE) ? nodeObject.get(FILE).textValue() : "";
language = nodeObject.hasNonNull(LANGUAGE) ? nodeObject.get(LANGUAGE).textValue() : "";
// 如果是禁用的就不编译了
if (!getEnableByJsonNode(nodeObject)) {
@ -226,7 +227,8 @@ public class ParserHelper {
.setClazz(clazz)
.setScript(script)
.setType(type)
.setFile(file);
.setFile(file)
.setLanguage(language);
ParserHelper.buildNode(nodePropBean);
}