Replies: 2 comments
-
I'm not keen on the details, but it's important to be able to manage all different states in your state machine as part of the same app and construct tree. Rewriting this to not be a construct would be much more effort than it's worth when the product has a stable contract |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
General Issue
Why is @aws-cdk/aws-stepfunctions State a Construct?
The Question
State
is a Construct even though it does not render into a CloudFormation resource and has noaws:cdk:path
metadata. It instead renders as fragment of the JSON embedded under theDefinitionString
key where thescope
argument of theConstruct
is discarded and theid
argument of theConstruct
becomes the name (dictionary key) of the state.I believe that having
State
be a construct complicates its interface by creating an artificial dependency on the parent construct or another scope. It furthermore obscures the fact that theid
will become the name of the step, whereas CloudFormation resource IDs and StepFunctions task names are different categories of identifier with different semantics.Would it not make more sense to have
State
represented by a standalone class independent ofConstruct
?CDK CLI Version
1.136.0 (build ae13a75)
Framework Version
No response
Node.js Version
v16.8.0
OS
macOS
Language
Typescript
Language Version
4.5.4
Other information
No response
Beta Was this translation helpful? Give feedback.
All reactions