aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

fix(stepfunctions-tasks): EvaluateExpression does not support Context parameters and whole State/Context parameter

Open Hazzard17h opened this issue 3 years ago • 3 comments

Let use Context parameters within the expression:

new EvaluateExpression(scope, 'Get Exeuction Id', {
  expression: '`${$$.Execution.Id}`',
  resultPath: '$.executionId'
});

Fixes #14777


Let use whole State/Context parameter within the expression:

new EvaluateExpression(scope, 'Id', {
  expression: '`${($).optional?.parameter ?? "Default"} ${($$).Task?.Token ?? "No token"}`',
  resultPath: '$.result'
});

This is useful to use optional chaining and/or nullish coalescing operator on properties that could be possibly unsetted, and referencing them directly will result in an error (eg: "The JSONPath ... could not be found in the input").

Fixes #20882


All Submissions:

Adding new Unconventional Dependencies:

  • [ ] This PR adds new unconventional dependencies following the process described here

New Features

  • [ ] Have you added the new feature to an integration test?
    • [ ] Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Hazzard17h avatar Jun 29 '22 16:06 Hazzard17h

gitpod-io[bot] avatar Jun 29 '22 16:06 gitpod-io[bot]

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

aws-cdk-automation avatar Aug 06 '22 00:08 aws-cdk-automation

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: de9fb10035c8ca6c627e60115ce420299f677db1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

aws-cdk-automation avatar Aug 06 '22 14:08 aws-cdk-automation

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

aws-cdk-automation avatar Aug 30 '22 00:08 aws-cdk-automation

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

aws-cdk-automation avatar Sep 06 '22 02:09 aws-cdk-automation