I was struggeling with how to send data between parent and child runbooks in Orchestrator, so I thought I’d write a quick recap here.
Child runbooks can be usefeul in several scenarios such as “code” reuse, breaking apart large runbooks or when you need to run part of your workflow with different credentials. Anyway, here’s how to do it:
I’ve created two simple runbooks, “Parent” and “Child”. The idea is to take a parameter when starting the parent, passing it down to “child” and back up again to parent.
This is the parent runbook. It takes a single parameter
The “Invoke Runbook” activity is what will call the child runbook. Configure the parameter to send down to the child runbook and bind it to the parameter from “Initialize data”
Here we configure what the child runbook returns back to the parent:
Also, the child runbook needs a “return data” activity in order to send data back up to the parent:
Back in the parent runbook, I’ve simply inserted a “Send platform event” activity to show me the data I got:
And that’s pretty much it!