# Step Functions Job Poller --- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge) > **This is an experimental example. It may not build out of the box** > > This examples is built on Construct Libraries marked "Experimental" and may not be updated for latest breaking changes. > > If build is unsuccessful, please create an [issue](https://github.com/aws-samples/aws-cdk-examples/issues/new) so that we may debug the problem --- This example creates a basic Step Function workflow that starts a task and then listens at regular intervals for completion, then reports completion and status. Tasks: 1. `Start` 2. `Submit Lambda`: Invoke Submit Lambda which sets status 3. `Wait X Seconds`: Wait 4. `Get Job Status`: Invoke Check Status Lambda which validates status 5. `Job Complete?`: Choice: Read `"status"` of payload a. If `"status"` is `"SUCCEEDED"` then continue to `#7 Get Final Job Status` task b. If `"status"` is `"FAILED"` then continue to `#6 Job Failed` task c. else return to task `#3 Wait X Seconds` 6. `Job Failed`: Define a Fail state in the state machine. 7. `Get Final Job Status`: Invoke Check Status Lambda 8. `End` ## Build To build this app, you need to be in this example's root folder. Then run the following: ```bash $ npm install -g aws-cdk $ npm install $ npm run build ``` This will install the necessary CDK, then this example's dependencies, and then build your TypeScript files and your CloudFormation template. ## Deploy Run `cdk deploy`. This will deploy / redeploy your Stack to your AWS Account. After the deployment you will see the API's URL, which represents the url you can then use. ## Synthesize Cloudformation Template To see the Cloudformation template generated by the CDK, run `cdk synth`, then check the output file in the "cdk.out" directory.