(aws-stepfunctions): CustomState generates wrong code when using Type: Choice
#32716
Labels
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
I am using the
CustomState
construct to generate aChoice
withJSONata
. The problem is that sinceCustomState
implementsINextable
, this adds anEnd
property which is invalid for theChoice
state.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
For this CDK construct
I would expect, the proper JSON to be constructed without the
End
property.Current Behavior
This is the generated JSON
Reproduction Steps
This is easily reproduced using the construct above.
Possible Solution
One solution would be adding an if statement to conditionally call
renderNextEnd()
intoStateJson()
but thenCustomState
wouldn't really implementINextable
. There needs to be a construct one level higher that doesn't implementINextable
.Additional Information/Context
No response
CDK CLI Version
2.173.2 (build f8e6207)
Framework Version
No response
Node.js Version
20
OS
AL2
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: