Home » Orchestrator » Dependencies between runbooks in Orchestrator

Dependencies between runbooks in Orchestrator

Today I received a question if it is possible to see the relationship between runbooks in Orchestrator. Relationships in this scenario is runbooks invoking each other. When you build a library of core runbooks, runbooks providing functions multiple runbooks will invoke and use, it is important not to modify these core runbooks without look at all dependencies. We cant see that relationship in a easy way with the runbook designer console. Of course we can open each invoke runbook activity in each runbook and draw the map manually, but that would take a lot of time. Running a SQL query against the Orchestrator database is a faster solution.

The first step in building that SQL query is to list all invoke runbook activities we have in use. The SQL query below will list all activities, or actually all objects, in the Orchestrator environment not marked as deleted. The Objects table includes for example folders too, so not only runbooks.

SELECT Deleted, Name, ParentID, Description, ObjectType
FROM OBJECTS
WHERE (Deleted = 0)

Scroll down in the result list until you find a Invoke Runbook activity, copy the value from the ObjectType field. With the ObjectType value we can now update the query to only include Invoke Runbook activities.

SELECT Deleted, Name, ParentID, Description, ObjectType
FROM OBJECTS
WHERE (Deleted = 0) AND (ObjectType = ‘9C1BF9B4-515A-4FD2-A753-87D235D8BA1F’)

ParentID is the runbook where the Invoke Runbook activity exists, if we want to show the runbook too, we update the query like

SELECT OBJECTS.Name, OBJECTS.Description, POLICIES.Name AS Expr1
FROM OBJECTS INNER JOIN
POLICIES ON OBJECTS.ParentID = POLICIES.UniqueID
WHERE (OBJECTS.Deleted = 0) AND (OBJECTS.ObjectType = ‘9C1BF9B4-515A-4FD2-A753-87D235D8BA1F’)

The next step is to look at the configuration of the Invoke Runbook activities

SELECT POLICIES.Name AS [Activity Name], OBJECTS.Name AS [Source Runbook], OBJECTS.Description AS [Activity Description], TRIGGER_POLICY.PolicyPath,
TRIGGER_POLICY.TriggerByPolicyPath, TRIGGER_POLICY.TargetActionServers, TRIGGER_POLICY.WaitToComplete
FROM OBJECTS INNER JOIN
POLICIES ON OBJECTS.ParentID = POLICIES.UniqueID INNER JOIN
TRIGGER_POLICY ON OBJECTS.UniqueID = TRIGGER_POLICY.UniqueID
WHERE (OBJECTS.Deleted = 0) AND (OBJECTS.ObjectType = ‘9C1BF9B4-515A-4FD2-A753-87D235D8BA1F’)

In the picture below you see a example result from the query. You can now turn this query around to list all runbooks that invokes a specific runbook, or all runbook invoked by a specified runbook.

 


2 Comments

  1. hi, I wanted to know what are the differnt services on which runbook server are dependent and how many Runbook server can be installed ?????

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.