In this step we will add ResultPath property to Check Name and Check Address state inside our machine state defined in state-machine/account-application-workflow.asl .json.
{
"StartAt": "Check Name",
"States": {
"Check Name": {
"Type": "Task",
"Parameters": {
"command": "CHECK_NAME",
"data": {
"name.$": "$.application.name"
}
},
"Resource": "${DataCheckingFunctionArn}",
"ResultPath": "$.checks.name",
"Next": "Check Address"
},
"Check Address": {
"Type": "Task",
"Parameters": {
"command": "CHECK_ADDRESS",
"data": {
"address.$": "$.application.address"
}
},
"Resource": "${DataCheckingFunctionArn}",
"ResultPath": "$.checks.address",
"Next": "Approve Application"
},
"Approve Application": {
"Type": "Pass",
"End": true
}
}
}
sam deploy
In the next step we will try to execute the workflow to see the results.