fix(stepfunctions): serialize Scheduler target input (#4168)

Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
This commit is contained in:
vamsiakandVamsi Akavarapu authored and GitHub committed 2026-09-22 15:45:58 -04:00
1 parent 3cf6c76811
commit 1abc817c5d
4 files changed
+270 -1

No files matched your search

@@ -1442,16 +1442,29 @@ public class AslExecutor {
}
}
/** Converts the SDK's RFC 3339 timestamps to the epoch-second values used by the wire parser. */
/** Converts SDK task values to the representations used by the Scheduler wire parser. */
private JsonNode normalizeAwsSdkSchedulerInput(JsonNode input) {
JsonNode normalized = input.deepCopy();
if (normalized instanceof ObjectNode object) {
normalizeAwsSdkSchedulerTimestamp(object, "StartDate");
normalizeAwsSdkSchedulerTimestamp(object, "EndDate");
normalizeAwsSdkSchedulerTargetInput(object);
}
return normalized;
}
private void normalizeAwsSdkSchedulerTargetInput(ObjectNode input) {
JsonNode target = input.get("Target");
if (!(target instanceof ObjectNode targetObject)) {
return;
}
JsonNode value = targetObject.get("Input");
if (value == null || value.isNull() || value.isTextual()) {
return;
}
targetObject.put("Input", value.toString());
}
private void normalizeAwsSdkSchedulerTimestamp(ObjectNode input, String field) {
JsonNode value = input.get(field);
if (value == null || value.isNull() || value.isNumber()) {