Branching in System Center Orchestrator Runbooks

Author by Duncan Lindquist

When creating a runbook for orchestrator you connect your runbook activities using an arrow that you drag from one activity to the next. These arrows are called link filters they are used to create an execution policy to decide whether or not to run the next activity. If you double click on the link filter it will open up your filter information. You will notice there is a default filter to make sure that the activity at the start of the link filter ran successfully before allowing it to move on to the next activity. Branching is when you split the path of your runbook by creating multiple link filters from one activity. To create a new link filter you simply grab from your start activity and drag it to the activity at the start of your second path. In the picture below I am creating a new user. The type of user is dependent on the department information gathered by the create username task. To create this I used exclude filters. Take a look at the filters set in the link filter between create username and create dev user. You will notice that I am excluding all of the departments except for dev. This way only it will only follow this link filter if the department is set to dev. I created the same type of filter for sales and infra so after the Create Username activity runs it will check the department information and select the correct path to create that type of user. Now that you understand how link filters work lets go through how to create a filter. First double click on your link filter. Now that its open click add you will notice this just adds a second default filter to the filter list. The first thing you need to do is change the data it is checking to do that click on the underlined content at the start of the filter. You will now be able to select any of the published data from the activity at the start of the link filter. Once you have selected your data click ok. The next variable we want to choose is the second underlined content for the filter. This will allow you to set the condition for when the filter will execute. For the department example above I chose the equals option because I wanted to exclude those exact departments. I could have accomplished the same results by selecting the does not equal and then selecting the dev department. The last variable is the value. Based off your condition the value will be checked against the published data selected in the first step. Once you are done click ok and you have created your first filter. In the example below the value will be checked against what is stored in the department published data. If you look at the top filter you can see that if the published data for department equals infrastructure the Runbook will not continue down this path. You are now ready to start creating link filters and to do some branching!


Duncan Lindquist

Service Management & Automation Solution Lead