[{"data":1,"prerenderedAt":53},["ShallowReactive",2],{"workflow-emit-and-wait":3},{"id":4,"title":5,"cleanup":6,"contributors":11,"deploy":13,"description":16,"diagram":17,"extension":18,"framework":19,"gitHub":20,"introBox":29,"level":33,"meta":34,"resources":35,"s3URL":41,"services":42,"simplicity":44,"stem":45,"testing":46,"type":50,"usecase":51,"videoId":28,"__hash__":52},"workflows\u002Fworkflows\u002Femit-and-wait.json","Emit and wait workflow",{"headline":7,"text":8},"Cleanup",[9,10],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[12],"content\u002Fcontributors\u002Fbenjamin-smith.json",{"text":14},[15],"sam deploy --guided","Implement a callback pattern within your workflow","\u002Fassets\u002Fimages\u002Fworkflows\u002Femit-and-wait.png","json","AWS SAM",{"template":21,"payloads":26},{"repoURL":22,"templateDir":23,"templateFile":24,"ASL":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Femit-and-wait\u002F","emit-and-wait\u002F","template.yaml","statemachine\u002Fstatemachine.asl.json",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32],"A single workflow orchestrates a producitonline from start to completion, at various “milestones”, an event is emitted onto a serverless event bus (Event Bridge). The events are produced using the putEvents.waitForTaskToken. This allows the workflow to pause until receiving a resume command with the corresponding task token. Adding a `heartbeat` value to the putEvents task acts as a graceful timeout fallback.","100",{},{"headline":36,"bullets":37},"Additional resources",[38],{"text":39,"link":40},"The AWS Step Functions Workshop","https:\u002F\u002Fcatalog.workshops.aws\u002Fstepfunctions\u002Fen-US","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fworkflows\u002Femit-and-wait\u002Fcloudformation.yml",[43],"eventbridge","2 - Pattern","workflows\u002Femit-and-wait",{"headline":47,"text":48},"Testing",[49],"See the GitHub repo for detailed testing instructions.","Standard","Production Line","I5HSbkq0zmcPtWOV1nH6TVgXLH3odd1o7wtOmNHLAjQ",1780828551576]