[{"data":1,"prerenderedAt":56},["ShallowReactive",2],{"workflow-human-in-the-loop":3},{"id":4,"title":5,"cleanup":6,"contributors":10,"deploy":12,"description":15,"diagram":16,"extension":17,"framework":18,"gitHub":19,"introBox":28,"level":35,"meta":36,"resources":37,"s3URL":43,"services":44,"simplicity":47,"stem":48,"testing":49,"type":53,"usecase":54,"videoId":27,"__hash__":55},"workflows\u002Fworkflows\u002Fhuman-in-the-loop.json","Human in the Loop",{"headline":7,"text":8},"Cleanup",[9],"1. Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fben-freiberg.json",{"text":13},[14],"sam deploy --guided","Wait for an approval from a human reviewer before continuing","\u002Fassets\u002Fimages\u002Fworkflows\u002Fhuman-in-the-loop.png","json","AWS SAM",{"template":20,"payloads":25},{"repoURL":21,"templateDir":22,"templateFile":23,"ASL":24},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Fhuman-in-the-loop\u002F","human-in-the-loop","template.yaml","statemachine\u002Fstatemachine.asl.json",[26],{"headline":27,"payloadURL":27},"",{"headline":29,"text":30},"How it works",[31,32,33,34],"This pattern allows you to integrate an human review or approval process into your workflows.","The task sends a message to a SNS topic which sends a notification to a human reviewer or approver by email for example. The workflow then waits until the approver completes their review. Depending on the review outcome a different Lambda function can be invoked.","Waiting for completion of the review is done using the .waitForTaskToken service integration. The payload of the SNS message contains a task token, which is automatically generated by AWS Step Functions.","The task will pause until it receives that task token back with a SendTaskSuccess or SendTaskFailure API call.","100",{},{"headline":38,"bullets":39},"Additional resources",[40],{"text":41,"link":42},"The AWS Step Functions Workshop","https:\u002F\u002Fcatalog.workshops.aws\u002Fstepfunctions\u002Fen-US","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fworkflows\u002Fhuman-in-the-loop\u002Fcloudformation.yml",[45,46],"sns","lambda","2 - Pattern","workflows\u002Fhuman-in-the-loop",{"headline":50,"text":51},"Testing",[52],"See the GitHub repo for detailed testing instructions.","Standard","Content Moderation","tIvZUrFyufNprkpBZ1_bfTe9rmYvVHqwT7GEDYKNyvM",1779273340812]