[{"data":1,"prerenderedAt":54},["ShallowReactive",2],{"workflow-workflow-within-a-workflow":3},{"id":4,"title":5,"cleanup":6,"contributors":10,"deploy":12,"description":15,"diagram":16,"extension":17,"framework":18,"gitHub":19,"introBox":28,"level":36,"meta":37,"resources":38,"s3URL":41,"services":42,"simplicity":45,"stem":46,"testing":47,"type":51,"usecase":52,"videoId":27,"__hash__":53},"workflows\u002Fworkflows\u002Fworkflow-within-a-workflow.json","Start a Workflow within a Workflow",{"headline":7,"text":8},"Cleanup",[9],"1. Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fzainab-allawi.json",{"text":13},[14],"sam deploy --guided","This sample project demonstrates how to use an AWS Step Functions state machine to launch other state machine executions.","\u002Fassets\u002Fimages\u002Fworkflows\u002Fworkflow-within-a-workflow.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\u002Fworkflow-within-a-workflow\u002F","workflow-within-a-workflow","template.yaml","statemachines\u002Fmain-state-machine.asl.json",[26],{"headline":27,"payloadURL":27},"",{"headline":29,"text":30},"How it works",[31,32,33,34,35],"The state machine combines workflows using a Step Functions StartExecution task state with various integration patterns.","When the main state machine is executed, it will first start executing the nested state machine using the call and continue integration pattern. This integration pattern means that the main state machine will call an API (StartExecution), receive an HTTP response and then continue to the next step.","In parallel, the main state machine will then execute the nested state machine using wait for child execution to complete on one branch, and wait for callback on another branch.","When the main state machine starts executing the nested state machine using the wait for child execution to complete integration pattern, this causes the main state machine to pause the execution at this state and monitor the nested state machine's execution. The main state machine will resume when the nested state machine's execution is complete.","When the main state machine starts executing the nested state machine using the wait for callback integration pattern, this causes the main state machine to pause the execution until it receives a callback from the SendTaskSuccess or SendTaskFailure APIs with the task token. The nested state machine's Lambda function will send a SendTaskSuccess API call when this integration pattern is chosen.","100",{},{"headline":39,"bullets":40},"Additional resources",[],null,[43,44],"sfn","lambda","1 - Fundamental","workflows\u002Fworkflow-within-a-workflow",{"headline":48,"text":49},"Testing",[50],"See the GitHub repo for detailed testing instructions.","Standard","Automation","P7CzXzDLvmLmJgCwM5zf__bXgdHdcU7tGCV4-iKeQc0",1779273341495]