You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dfe29ce
Browse filesBrowse the repository at this point in the historyBrowse files
feat(stepfunctions): properties for ErrorPath, CausePath, MaxDelay, Jitter (#27051)
The Fail state supports JsonPath values in the `ErrorPath` and `CausePath` field to filter the state input and serve as the state error and cause.
The Retry block supports exponential backoff with Jitter and capped interval retry growth with MaxDelay.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/aws-cdk-lib/aws-stepfunctions/README.md
+20-5Lines changed: 20 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,8 @@ These properties impact how each individual step interacts with the state machin
128
128
*`resultSelector`: the part of the step result that should be added to the state machine data
129
129
*`resultPath`: where in the state machine data the step result should be inserted
130
130
*`outputPath`: what part of the state machine data should be retained
131
+
*`errorPath`: the part of the data object that gets returned as the step error
132
+
*`causePath`: the part of the data object that gets returned as the step cause
131
133
132
134
Their values should be a string indicating a [JSON path](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-paths.html) into the State Machine Data object (like `"$.MyKey"`). If absent, the values are treated as if they were `"$"`, which means the entire object.
133
135
@@ -421,8 +423,12 @@ parallel.branch(shipItem);
421
423
parallel.branch(sendInvoice);
422
424
parallel.branch(restock);
423
425
424
-
// Retry the whole workflow if something goes wrong
425
-
parallel.addRetry({ maxAttempts: 1 });
426
+
// Retry the whole workflow if something goes wrong with exponential backoff
Copy file name to clipboardExpand all lines: packages/aws-cdk-lib/aws-stepfunctions/lib/types.ts
+30-1Lines changed: 30 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,21 @@ export interface IChainable {
34
34
readonlyendStates: INextable[];
35
35
}
36
36
37
+
/**
38
+
* Values allowed in the retrier JitterStrategy field
39
+
*/
40
+
exportenumJitterType{
41
+
/**
42
+
* Calculates the delay to be a random number between 0 and the computed backoff for the given retry attempt count
43
+
*/
44
+
FULL='FULL',
45
+
46
+
/**
47
+
* Calculates the delay to be the computed backoff for the given retry attempt count (equivalent to if Jitter was not declared - i.e. the default value)
48
+
*/
49
+
NONE='NONE',
50
+
}
51
+
37
52
/**
38
53
* Predefined error strings
39
54
* Error names in Amazon States Language - https://states-language.net/spec.html#appendix-a
0 commit comments