paulshestakov / aws-step-functions-constructor

VSCode extension to visualize AWS step functions
MIT License
31 stars 11 forks source link

Unexpected behaviour when using `End: true` inside a Map iterator #18

Closed ljacobsson closed 3 years ago

ljacobsson commented 3 years ago

Hi, I have the following ASL:

StartAt: Map
States:
  Map:
    End: true
    ItemsPath: "$.Ids"
    Iterator:
      StartAt: SyncItem
      States:
        SyncItem:
          Retry:
          - ErrorEquals:
            - States.ALL
            IntervalSeconds: 1
            BackoffRate: 2
            MaxAttempts: 3
          Catch:
          - ErrorEquals:
            - States.ALL
            Next: LogError
          End: true
          OutputPath: "$.Payload"
          Parameters:
            FunctionName.$: "$.FunctionName"
            Payload:
              ItemId.$: "$.ItemId"
          Resource: arn:aws:states:::lambda:invoke
          Type: Task
        LogError:
          Type: Pass
          End: true
    MaxConcurrency: 20
    Parameters:
      FunctionName.$: "$.FunctionName"
      ItemId.$: "$$.Map.Item.Value"
    Type: Map

Note that successful runs of SyncItem exits (End: true). Same goes for LogError

I'm expecting the diagram to point them to End, but it looks like this: image

ljacobsson commented 3 years ago

Thanks for another fast fix 🙏

paulshestakov commented 3 years ago

No problem, pushed the new version There was a problem with this case, indeed. Thanks! Should look like this now: image