{
"application": {
"name": "Spock",
"address": "123 Enterprise Street"
}
}
After a while, you will see that the execution failed. This time, however, we don’t have any red states, because this time we get a different error.
Check Name status has executed successfully, however Check Address status is grayed out. If you look at the color code at the bottom of the visualization you will see that this means the state has been destroyed. Let’s see why.
{
"error": "States.Runtime",
"cause": "An error occurred while executing the state 'Check Address' (entered at the event id #7). The JSONPath '$.application.address' specified for the field 'address.$' could not be found in the input '{\"flagged\":false}'"
}
If you look back at our state machine definition for the Check Address state, you’ll see that it expects an application object in its input and it tries to pass application .address down to Lambda function Data Checking.
The error message tells us that the state machine cannot find application.address in the state input. To understand why, we need to learn a little more about how an active state produces its output and passes it to the next state’s input in the next step.