Kicking off SMA Runbooks from SCSM Part 1: Extending the Runbook Automation Activity Class

Author by Duncan Lindquist

This blog series will be covering how to kick of SMA runbooks from SCSM. We will cover everything from preparing SCSM to kick of runbooks to dealing with runbook failures. In this first post we will be covering Extending the Runbook Automation class.  

Extending the Runbook Automation Class

The first step to kicking off SMA runbooks from SCSM will be adding a few properties to the Runbook Automation Class. These two properties will be lists one will contain the list of SMA Runbooks the second will contain the status of the SMA runbook. To do this we will need to open up the SCSM Authoring tool and create a new runbook to contain our runbook automation activity class extensions. To do this click file then new and create your management pack. 01-Create MP   Now that we have our new Management pack we want to find the runbook automation activity class and extend it. To do this right click on the class and click extend. 1-Extend Class     Next we will need to create our two new properties for our SMA runbooks on for our list of runbooks and one for our list with the status in it. To do this open the extended class from your management pack click property and create both fo the new properties. 2-Create Property   Now that we have the properties created we want to change the data type to list. To do this click on the new properties that we created and find the Data Type section. Click the drop down (its hidden on the right side of the box) and click list. 3-List   You will be prompted with the available set of list. Click the Create List... button and give your list an internal name and a friendly display name. 4-Create list   Next seal the management pack and import it into SCSM. For information on sealing management packs click here. Now that we have the lists in SCSM click on the library tab select lists then find your new lists. In the SMA Runbooks list enter in all of your SMA Runbook names. In the SMA Runbook Status list enter all the different statuses for your runbook. Below I have the base statuses that I use. 5-Update Lists   Next we need to create a template for our new SMA Runbook. To do this click on the library tab select templates then create template. 08-Template01   Name your template after the runbook you wish to kick off. In the class section select the Runbook Automation Activity Class. 6-Create the Template   Now that the template is open click the extensions tab. Select the SMA Runbook that you want to use the template for and set the status to not run. Then click ok and save the template. 7-Extensions We now have a template ready to use in our Service Requests! The next step is to create the monitor in SMA so that we can watch for the runbook. We will do this in the next blog post so stay tuned! Part 2: Monitor Runbook Part 3: Kick off a Singe Runbook Part 4:Monitor for Multiple Runbooks  
Author

Duncan Lindquist

Service Management & Automation Solution Lead