Open AdamPhasey opened 1 month ago
Are you running cdk synth
for your project before checking trying to visualize the updated state machine?
it may show me the a different one
Is it showing the correct visualization of another state machine in your CDK app?
@wong-a hey, yes. I can also see the correct visualisation of other state machines
@wong-a I got around this by instantiating the construct in the stack instead and then passing it to the 'parent' state machine - that solved it for me. However, the problem still stands I guess...
Hey Adam, could you please provide the exact steps to reproduce the issue with the relevant code? It will allow us to troubleshoot any potential issues, thanks!
Problem
when rendering visuals of several state machines, the rendering tool sometimes displays specific machines only. For instance, if I have three machines and I rendered one as a graph (asl), it may show me the a different one. My thoughts originally was that it was due to length of name, however, when I shortened the name whilst that resolved it for some issues, it subsequently did not work for other machines. I also noticed it when I added a parallel state, but removing it did not resolve it. I believe it has something to do with instantiating constructs within a parent construct. That might be confusing the tool. It's really hard to say.
Anything to do with the fact I write this in TS? Perhaps the conversion of TS to ASL might be problematic for more complicated workflows...
When I deploy, I do not have any issues and I can correctly see the state machines as per my design on the Step Functions studio.
The way I work around this is to instantiate a class containing a machine in the stack and pass it as props to the parent construct I initially wanted it to be declared in.
Steps to reproduce the issue
Here is the child construct below:
Expected behavior
I expected that the rendering tool would always correctly identify the state machine I requested. However, for some reason when nesting/instantiating other constructs, it mixes it up and defaults to the parent state machine.
System details (run
AWS: About
and/orAmazon Q: About
)