feat(REQ-3340) - 优化解析表单实例数据的逻辑

This commit is contained in:
wangli 2025-02-11 17:13:49 +08:00
parent 475759a9cc
commit e5a92af9ec

View File

@ -298,6 +298,7 @@ public class CustomGetFormInstanceModelCmd extends GetFormInstanceModelCmd {
}
} else if (FORM_FIELD_TYPE_CUSTOM_COMPONENT.equals(field.getType())) {
String listJson = (String) variables.get(field.getId());
if (listJson != null) {
ObjectMapper objectMapper = formEngineConfiguration.getObjectMapper();
try {
List<Map> rows = objectMapper.readValue(listJson, new TypeReference<List<Map>>() {
@ -371,6 +372,7 @@ public class CustomGetFormInstanceModelCmd extends GetFormInstanceModelCmd {
} catch (JsonProcessingException e) {
throw new WorkflowEngineException(FORM_DATA_PARSE_ERROR_BY_CUSTOM_COMPONENT);
}
}
} else {
Object variableValue = variables.get(field.getId());
if (variableValue != null) {