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
You can also use an intrinsic function that returns a string to specify CausePath and ErrorPath.
491
+
The available functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID.
Copy file name to clipboardExpand all lines: packages/aws-cdk-lib/aws-stepfunctions/lib/states/fail.ts
+53-3Lines changed: 53 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
import{Construct}from'constructs';
2
2
import{StateType}from'./private/state-type';
3
3
import{renderJsonPath,State}from'./state';
4
+
import{Token}from'../../../core';
4
5
import{INextable}from'../types';
5
6
6
7
/**
@@ -31,6 +32,9 @@ export interface FailProps {
31
32
/**
32
33
* JsonPath expression to select part of the state to be the error to this state.
33
34
*
35
+
* You can also use an intrinsic function that returns a string to specify this property.
36
+
* The allowed functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID.
37
+
*
34
38
* @default - No error path
35
39
*/
36
40
readonlyerrorPath?: string;
@@ -45,6 +49,9 @@ export interface FailProps {
45
49
/**
46
50
* JsonPath expression to select part of the state to be the cause to this state.
47
51
*
52
+
* You can also use an intrinsic function that returns a string to specify this property.
53
+
* The allowed functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID.
54
+
*
48
55
* @default - No cause path
49
56
*/
50
57
readonlycausePath?: string;
@@ -56,6 +63,16 @@ export interface FailProps {
56
63
* Reaching a Fail state terminates the state execution in failure.
57
64
*/
58
65
exportclassFailextendsState{
66
+
privatestaticallowedIntrinsics=[
67
+
'States.Format',
68
+
'States.JsonToString',
69
+
'States.ArrayGetItem',
70
+
'States.Base64Encode',
71
+
'States.Base64Decode',
72
+
'States.Hash',
73
+
'States.UUID',
74
+
];
75
+
59
76
publicreadonlyendStates: INextable[]=[];
60
77
61
78
privatereadonlyerror?: string;
@@ -80,9 +97,42 @@ export class Fail extends State {
0 commit comments