diff --git a/module-flow/src/main/java/net/savantly/nexus/flow/api/FlowApi.java b/module-flow/src/main/java/net/savantly/nexus/flow/api/FlowApi.java index 0f4c9b3..f405902 100644 --- a/module-flow/src/main/java/net/savantly/nexus/flow/api/FlowApi.java +++ b/module-flow/src/main/java/net/savantly/nexus/flow/api/FlowApi.java @@ -1,6 +1,7 @@ package net.savantly.nexus.flow.api; import java.io.IOException; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -68,7 +69,8 @@ public ResponseEntity submitFormJson(@PathVariable String formId, @RequestBody O if (payload instanceof Map) { payloadMap = (Map) payload; } else if (List.class.isAssignableFrom(payload.getClass())) { - payloadMap = Map.of("payload_array", payload); + payloadMap = new HashMap(); + payloadMap.put("payload_array", payload); } else { payloadMap = mapper.readValue(mapper.writeValueAsString(payload), Map.class); }