Check workflow

Check workflow

We’ll try submitting different applications to see how our state machine performs.

  1. Run the command below to submit a valid registration.
aws lambda invoke --function-name sfn-workshop-SubmitApplication --payload '{ "name": "Spock", "address": "123 Enterprise Street" }' /dev/stdout

ApplicationProcessingStateMachine-xxxxxxxxxxxx/

AWS Step Functions

  1. Back to StepFunctions interface, click on state machine

AWS Step Functions

  1. At the Executions tab, click on the last execution.

AWS Step Functions

  1. We can see Check Name and Check Address states executed in parallel.

AWS Step Functions

AWS Step Functions

AWS Step Functions

  1. Run the command below to submit an invalid registration.
aws lambda invoke --function-name sfn-workshop-SubmitApplication --payload '{ "name": "Spock", "address": "ABadAddress" }' /dev/stdout

AWS Step Functions

  1. Do the same steps 2-4, we will see our state machine stop at Pending Review step.

AWS Step Functions

AWS Step Functions

AWS Step Functions

  1. Run the command below to submit a subscription whose data cannot be processed.
aws lambda invoke --function-name sfn-workshop-SubmitApplication --payload '{ "name": "UNPROCESSABLE_DATA", "address": "123 Street" }' /dev/stdout

AWS Step Functions

  1. Do the same steps 2-4, we will see our state machine stop at Flag Application as Unprocessable step.

AWS Step Functions

AWS Step Functions

Congratulations on completing the workshop, we have a well-structured state machine to manage the processing of new registrations for a simple banking system. If desired, we can add one more step in our workflow to handle even more detailed logic related to opening a bank account for approved applications. Hopefully, through this workshop, you have gained the necessary experience to continue to develop applications on your own with AWS Step Functions.