Dynamic CI grouping for change management and Outage creation

Kavery1
Tera Contributor

In our set up, when an Outage record is created from change ticket and Dynamic CI is selected, it doesn't have effect on all related CI's that are part of Dynamic CI group. 

Is this Dynamic CI group functionality working as expected? ideally, we would expect it to show all related CI's of the Dynamic CI group having the outage record tagged. Can ServiceNow suggest something here

 

2 REPLIES 2

changeman
Tera Contributor

Interested in a solution for this as well. In theory the unpacking of constituent CIs on an Outage record could work the same way it does on Change Request, even though they are different types of records (Outage does not extend task like Change Request does) and use different tables to record the relationship between them and the CIs they affect (the Affected CIs related list):

 

change_request > task_ci

cmdb_ci_outage > cmdb_outage_ci_mtom

 

Interestingly enough, the Affected CI unpacking doesn't seem to work on Change Tasks (change_task), which also use the Affected CIs as related list.

 

The change_request table has a couple of Business Rules that utilize functions in a Script Include called ChangeCollisionHelper and its addCiToChangeAffectedCis() function:

 

Add CI to Affected CIs

Add CI to Affected CIs on change

 

Skimming the Script Include I don't see the Dynamic CI Group table (cmdb_ci_query_based_service) being referenced anywhere, so the unpacking may be happening via different route, though I haven't had a chance to review thoroughly.

changeman
Tera Contributor

I found out that the unpacking of Dynamic CI Group members into the Affected CIs list on Change Requests (task_ci table) happens via a Business Rule called "Sync Affected CI Dynamic Group," which references the TaskUtils Script Include (extends TaskUtilsSNC). The Script Include uses the following functions to unpack the CIs in a Dynamic CI Group or delete them:

 

unpackDynamicGroup: function(recordId, userId)
deleteUnpackedCIs: function(taskId, groupId, userId)
createWorker: function(recordId, groupId, userId, deleteCIs)
_getRunningWorker: function(recordId)
_insertTaskCIFromDynamicGroup: function(cmdb, taskId)
 
Since Outage records are not Tasks, the logic in these TaskUtil functions would need to be recreated to work with cmdb_ci_outage and cmdb_outage_ci_mtom tables instead of change_request and task_ci.