Skip to content

Commit ded630e

Browse files
author
Bob Strahan
committed
Add assessment and nested attributes to pattern-3.
1 parent d793ac0 commit ded630e

File tree

3 files changed

+341
-14
lines changed

3 files changed

+341
-14
lines changed

patterns/pattern-3/statemachine/workflow.asl.json

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,50 @@
9090
"BackoffRate": 2
9191
}
9292
],
93+
"Next": "AssessmentChoice"
94+
},
95+
"AssessmentChoice": {
96+
"Type": "Choice",
97+
"QueryLanguage": "JSONata",
98+
"Choices": [
99+
{
100+
"Condition": "{% ${IsAssessmentEnabled} = true %}",
101+
"Next": "AssessmentStep"
102+
}
103+
],
104+
"Default": "SectionComplete"
105+
},
106+
"AssessmentStep": {
107+
"Type": "Task",
108+
"Resource": "${AssessmentFunctionArn}",
109+
"Parameters": {
110+
"execution_arn.$": "$$.Execution.Id",
111+
"document.$": "$.document",
112+
"section_id.$": "$.section_id"
113+
},
114+
"ResultPath": "$.AssessmentResult",
115+
"Retry": [
116+
{
117+
"ErrorEquals": [
118+
"Sandbox.Timedout",
119+
"Lambda.ServiceException",
120+
"Lambda.AWSLambdaException",
121+
"Lambda.SdkClientException",
122+
"Lambda.TooManyRequestsException",
123+
"ServiceQuotaExceededException",
124+
"ThrottlingException",
125+
"ProvisionedThroughputExceededException",
126+
"RequestLimitExceeded"
127+
],
128+
"IntervalSeconds": 2,
129+
"MaxAttempts": 10,
130+
"BackoffRate": 2
131+
}
132+
],
133+
"Next": "SectionComplete"
134+
},
135+
"SectionComplete": {
136+
"Type": "Pass",
93137
"End": true
94138
}
95139
}
@@ -170,4 +214,4 @@
170214
"End": true
171215
}
172216
}
173-
}
217+
}

0 commit comments

Comments
 (0)