Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stepfunctions): improve Task payload encoding #2706

Merged
merged 2 commits into from
Jun 4, 2019

Commits on May 31, 2019

  1. fix(stepfunctions): improve Task payload encoding

    Improve referencing data fields for StepFunctions tasks, in preparation
    of callback task implementaion.
    
    Get rid of `JsonPath`, and in its place we have 2 new classes:
    
    - `DataField`, for fields that come from the user payload
      (`$.My.Field`). Settle on the term "data" since that's the
      term used in most of StepFunctions' docs.
    - `ContextField`, for fields that come from the service-defined
      task "context" (like `$$.Execution.StartTime`, and in particular
      `$$.Task.Token`).
    
    These classes have been moved from the `-tasks` module to the
    `aws-stepfunctions` module, where it seems to make more sense for them
    to live.
    
    Add support for SQS and SNS tasks to publish an arbitrary JSON
    structure that can reference fields from context and execution data.
    
    Remove `NumberValue` since we can now encode Tokens in regular number
    values.
    
    BREAKING CHANGES:
    
    - `JsonPath.stringFromPath` (and others) are now called `DataField.fromStringAt()`.
      The `DataField` class now lives in the main stepfunctions module.
    - `SendToQueue` property `messageBody` => `message`.
    - `PublishToTopic` property `messageObject` used to take a pre-JSONified
      object, now directly accepts a JSON object.
    - Instead of passing `NumberValue`s to StepFunctions tasks, pass regular
      numbers.
    rix0rrr committed May 31, 2019
    Configuration menu
    Copy the full SHA
    f196130 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2019

  1. Address review comments

    rix0rrr committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    b8ac1bd View commit details
    Browse the repository at this point in the history