This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Add Step Functions support for Variables and JSONata features#11906
Merged
dominikschubert merged 3 commits intomasterfrom Nov 22, 2024
Merged
Add Step Functions support for Variables and JSONata features#11906dominikschubert merged 3 commits intomasterfrom
dominikschubert merged 3 commits intomasterfrom
Conversation
c9e5999 to
1239be5
Compare
dominikschubert
pushed a commit
that referenced
this pull request
Nov 22, 2024
Co-authored-by: Greg Furman <[email protected]>
dominikschubert
added a commit
that referenced
this pull request
Nov 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The AWS Step Functions API and Amazon States Language (ASL) have newly introduced support for the following features:
JSONataquery and transformation language as an alternative toJSONPath.Changes
JSONata
QueryLanguagefield to specify whether to evaluate expressions usingJSONataorJSONPath(default). This can be set at the:{% %}will be evaluated asJSONatawhere present as the value of a non-Path ASL field, a JSON object field, or a JSON array element.ArgumentsandOutputfields replace usage of the input and output Path fields inJSONPath(InputPath,Parameters,ResultSelector,ResultPath, andOutputPath).Pathversions of fields are not supported, whereJSONataenclosed expressions should be used instead.JSONatavariable called$stateswith the following values:$states.input: A state's raw input$states.result: An API or sub-workflow's result (if successful)$states.errorOutput: An error output (only available inCatch)$states.context: The context objectMapstateItemsfield has been added that accepts a JSON array or aJSONataexpression that must evaluate to an array.ChoicestateConditionfield for choice rules that accepts a boolean constant or aJSONataexpression that must evaluate to a boolean.JSONatafunction library can be used when defining expressions. This replaces the usage of Step Functions' intrinsic functions.Worfklow Variables
JSONataorJSONPathstates using the newAssignfield.$prefix. For example, an assigned variablefoocan be accessed with a$like$foo.JSONatareference will require the{% %}to enclose the statement i.eJSONPathreference will require the ASL field to include a.$suffix to follow the field name i.eInputPath,ResultSelector,ResultPath, andOutputPath.