Conversation
…dation and testing Tested all code snippets with this power and fixed all discovered issues Reviewed POWER.md and updated it
| displayName: "AWS Step Functions" | ||
| description: "Build AWS Step Functions state machines using the JSONata query language. Covers Amazon States Language (ASL) structure, all state types, variables, data transformation, error handling, and service integrations." | ||
| keywords: ["step functions", "state machine", "serverless", "jsonata", "asl", "amazon states language", "workflow orchestration"] | ||
| author: "[Jeff Palmer](https://linkedin.com/in/jeffrey-palmer/)" |
There was a problem hiding this comment.
| author: "[Jeff Palmer](https://linkedin.com/in/jeffrey-palmer/)" | |
| author: "AWS" |
| name: "aws-step-functions" | ||
| displayName: "AWS Step Functions" | ||
| description: "Build AWS Step Functions state machines using the JSONata query language. Covers Amazon States Language (ASL) structure, all state types, variables, data transformation, error handling, and service integrations." | ||
| keywords: ["step functions", "state machine", "serverless", "jsonata", "asl", "amazon states language", "workflow orchestration"] |
There was a problem hiding this comment.
| keywords: ["step functions", "state machine", "serverless", "jsonata", "asl", "amazon states language", "workflow orchestration"] | |
| keywords: ["step functions", "state machine", "serverless", "jsonata", "asl", "amazon states language", "workflow", "orchestration"] |
| --- | ||
| name: "aws-step-functions" | ||
| displayName: "AWS Step Functions" | ||
| description: "Build AWS Step Functions state machines using the JSONata query language. Covers Amazon States Language (ASL) structure, all state types, variables, data transformation, error handling, and service integrations." |
There was a problem hiding this comment.
| description: "Build AWS Step Functions state machines using the JSONata query language. Covers Amazon States Language (ASL) structure, all state types, variables, data transformation, error handling, and service integrations." | |
| description: "Build workflows with AWS Step Functions state machines using the JSONata query language. Covers Amazon States Language (ASL) structure, all state types, variables, data transformation, error handling, and service integrations." |
|
|
||
| # AWS Step Functions | ||
|
|
||
| AWS Step Functions provides visual workflow orchestration with native integrations to 9,000+ API actions across 200+ AWS services. Define workflows as state machines in Amazon States Language using the JSONata query language instead of legacy JSONPath. |
There was a problem hiding this comment.
This mixes description (what is SFN) with guidance (Not using JSONPath), separate the two parts.
| | `Pass` | Pass input to output, optionally injecting or transforming data | | ||
| | `Succeed` / `Fail` | End execution successfully or with an error and cause | | ||
|
|
||
| ### Setting the State Machine Query Language |
There was a problem hiding this comment.
Extract all the JSONata specific parts to a separate file (or distribute it across the existing files) to keep the POWER.md as concise as possible. The guidance is around 100 lines if I recall correctly
There was a problem hiding this comment.
Doc is too long, consider removing some of the examples or only highlighting the key parts.
|
|
||
| **Merging result into input** (`ResultPath: "$.field"`): | ||
| ```json | ||
| // Preferred: use Assign to store, pass input through |
There was a problem hiding this comment.
Powers are written for agents, provide them with clear instructions when to use what. Use defaults and add overrides if necessary
| ### 1. Mixing JSONPath and JSONata fields in the same state | ||
| Invalid combinations: `Arguments` + `InputPath`, `Output` + `ResultSelector`, `Condition` + `Variable`. Remove all JSONPath fields from converted states. | ||
|
|
||
| ### 2. Forgetting to remove `.$` suffixes |
There was a problem hiding this comment.
Write this for agents, i.e. "Do not forget to remove .$ suffixes
| ✓ "orderId": "{% $states.input.orderId %}" | ||
| ``` | ||
|
|
||
| ### 3. Using `$` or `$$` instead of `$states` |
There was a problem hiding this comment.
Consider extracting full code examples to a snippets folder
Issue #, if available:
Description of changes:
Incorporated feedback from the AWS Step Functions Dev team and SA team into the aws-step-functions power.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.