Application Services: How to use them?
Application Services are essential part of the Common Service Data Model (CSDM). This article focuses on how to use Application Services for manually maintained Service Maps in the situation when Service Mapping is not deployed. Proper usage of Application Services is critical for correct behavior of some features, e.g.:
- Impacted Services (e.g. in the Change Management)
- Event Management (service impact, priority calculation, Operator Workspace etc.)
It is highly important to understand how Application Services are working: they DO NOT USE RELATIONSHIPS, they are WORKING WITH CI ASSOCIATIONS.
What is a CI Association?
ServiceNow Documentation says: "The Service Configuration Item Association table [svc_ci_assoc] binds an application service and a CI to track which CIs are part of each application service."
In practice, it is flattened table that contains "relationships" among Configuration Items and Application Services. I am having word relationships in quotation marks because CI Associations are separate data model that can be different from the relationships. And in this situation, when relationships and CI Associations are different, unexpected situations resulting in "Why my Service is not listed among Impacted Service when I have relationships in place?" may happen.
It is highly critical to have CI Associations populated correctly and in sync with Relationships. For performance reasons, traversing through all Relationships in the Impact analysis etc. is not possible. Therefore, Service Configuration Item Association [svc_ci_assoc] table is used for fast search.
How to make sure that Service Configuration Item Associations are populated?
This chapter will focus to 2 Application Service types:
- Mapped Application Service [cmdb_ci_service_discovered]
- Calculated Application Service [cmdb_ci_service_calculated]
There are 3 more Application Service types available:
- Application Service [cmdb_ci_service_auto] where no CI Associations are created at all
- Dynamic CI Group [cmdb_ci_query_based_service] where CI Associations are automatically created based on the specified CMDB Group
- Tag Based Application Service [cmdb_ci_service_by_tags] where CI Associations are automatically created based on Tags
You may check my previous Community Article CSDM 3.0: Paris release CMDB changes where they are visualised.
Mapped Application Service
This Application Service type may be created and maintained by:
- Service Mapping, and in this case you do not need to take care about the CI Associations as they are created automatically
- Manually, where you need to build Service Map and CI Associations manually
The following picture shows a new Application Service being created with Manual population method. You can add multiple Configuration Items into the manual map however: only directly added configuration items will create CI Associations.
If the added Configuration Item, DEMO Server on the example used, have some child relationships, they are ignored and CI Associations are not created for them. It means, Impacted Services etc. will work for directly listed Configuration Items but not for their children.
Once the Mapped Application Service is created, you may need to populate remaining Configuration Items manually, based on the existing relationships. Open the Mapped Application Service in the form view (the most easy is to type cmdb_ci_service_discovered.list in the filter navigator) and use "Update with changes from CMDB" UI Action (highlighted on the screenshot below). There is a need to use this UI Action after every change in the relationships, to ensure Service Map and CI Associations are in sync with CMDB relationships.
This approach is manual, with risk that CI Associations are not in sync with CMDB relationships, as people simply forget to click this UI Action. If you want to have the synchronization automated, you may need to use Calculated Application Service.
Calculated Application Service
A Calculated Application Service [cmdb_ci_service_calculated] is a type of the Application Service that is populated automatically based on the CMDB relationships. Changes in the CMDB relationships are detected automatically and Service Map together with CI Associations are adjusted automatically (through a scheduled job). You may control what Configuration Item classes are imported, for details please check my Community Article Application Services: Tips and Tricks.
Creation of the Calculated Application Service not straight-forward in the Quebec release, there is a need to:
- Create a Mapped Application Service
- Open the service form and use "Convert to Dynamic Service" UI Action
Once this UI Action is clicked, Mapped Application Service is re-classified as Calculated Application Service with few additional parameters populated.
Attribute "Levels" is highly important in here. This number says how many levels of CI Relationships is imported to the Application Service. Default value (set by the "svc.manual.convert.levels.default_value" property) is 3.
Attribute "Levels" is in practise attribute with element name "metadata" that needs to be populated with a JSON String: {"levels" : }.
Summary
The following table explains different types of Application Services and how Service Configuration Item Associations are populated.
Using Mapped Application Service [cmdb_ci_service_discovered] is not recommended for manually maintained maps. There is a significant risk of incorrect Service Configuration Item Associations. Use Calculated Application Service instead.
Table below shows limits for some Application Service types however it is NOT recommended to add more than 1000 Configuration Items into a single Application Service.
| Application Service type | CI Associations population | Note |
|---|---|---|
| Application Service [cmdb_ci_service_auto] | Not populated | |
| Mapped Application Service [cmdb_ci_service_discovered] | Automatically when Service Mapping is used Manually using "Update with changes from CMDB" UI Action | |
| Calculated Application Service [cmdb_ci_service_calculated] | Automatically based on the existing Relationships | |
| Dynamic CI Group [cmdb_ci_query_based_service] | Automatically based on the CMDB Group | This Application Service type supports max. 10 000 Configuration items |
| Tag Based Application Service [cmdb_ci_service_by_tags] | Automatically based on the Tags | This Application Service type supports max. 5 000 Configuration items |
Check my next Community Article Application Services: Tips and Tricks for useful tips on how to influence behavior of Application Services.
https://www.servicenow.com/community/common-service-data-model/application-services-how-to-use-them/ta-p/2308712