Xapity Blog

SCSM Type Projections - Creating and Using


Type Projections are used in Service Manager to define the relationships connected to a Work Item. If you add a custom relationship to a Work Item you will need to create a Type Projection if you want to display the relationship data in a view or you want to create queries (or searches) based on the relationship.

Analysts will see Type Projections under Combination Classes when they are doing searches.

Type Projections also help the general performance of Service Manager. When you do a search or create a view that have relationships (Combination Classes) Service Manager pulls back all the data relating to the defined relationships. This can have a large impact on Service Manager performance. It is best to use Type Projections that only have the relationships that you n eed and do not have extra (which will pull back unnecessary data).

The default Type Projections for an Incident can be seen in the screen shot below. Out of the box there are not that many - basically Incident (Advanced) that has everything and Incident (Typical) has Assigned To and Affected User.


Using Incident as an example some of relationships available can be shown by looking at the Incident (Advanced) Type Projection (viewed via Combination Classes)


The Incident (Advanced) has most things relating to an Incident, why do I need more Type Projections?

Because when running a query or looking at a view based on the Incident (Advanced) Type Projection it pulls back all the data relating to all the relationships defined. This can cause a heavy performance hit. It is best to only pull back the information required for the query or view. By defining more targeted Type Projections Service Manger will perform better.

Always try to use the most narrow Type Projection that you can. Using just the Work Item class (no Type Projections) will produce the best performance. Overuse of Incident (Advanced) can slow down Service Manger to the point of crashing. More information, see this blog from the Service Manager team.

Creating a Type Projection

Type Projections are created in a sealed management pack and are then imported into SCSM. The format of the management pack is outlined below and the main component is the TypeProjection section. Although, you will need to define the References (where the data is coming from) and LanguagePacks (friendly names for the Type Projections) as well.

XML Outline

<ManagementPack> <Manifest> <Identity> <References> </References> </Manifest> <TypeDefinitions> <EntityTypes> <TypeProjections> </TypeProjections> </EntityTypes> </TypeDefinitions> <LanguagePacks> </LanguagePacks> </ManagementPack>

Type Projection Example: Incident plus Affected user and Assigned to user

This example will use the Incident Class (along with the System and the Work Item Class) and define the relationship between the Incident Work Item and Affected user and Assigned To user. This will allow a view or a query to use any of the fields associated with Incident and the related Affected user or Assigned To user.

It is the same as the out of the box Incident (Typical), but we will give a more meaningful name of Incident (Assigned To and Affected User).

Note: The highlighted portions of the xml are essentially variables and can be anything, but they must match.

1. Name the Management Pack in the Identity section (filename must match)

<ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <Manifest> <Identity> <ID>Xapity.Incident.TypeProjections</ID> <Version>1.0.0.0</Version> </Identity> <Name>Xapity.Incident.TypeProjections</Name>

2. Define the References.

In this case we will need the System, Work Item and Incident Libraries.

<References> <Reference Alias="System"> <ID>System.Library</ID> <Version>7.5.3079.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference> <Reference Alias="Custom_WorkItem_Library"> <ID>System.WorkItem.Library</ID> <Version>7.5.3079.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference> <Reference Alias="Custom_Incident_Library"> <ID>System.WorkItem.Incident.Library</ID> <Version>7.5.3079.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference> </References> </Manifest>

3. Define the Type Definition

The Alias at the end of the Component Path is also like a variable and can be anything. If an application references the Type Projection then it will use these Aliases.

<TypeDefinitions> <EntityTypes> <TypeProjection ID="IncidentTypeProjection.AssignedToAffectedUser" Accessibility="Public" Type="Custom_Incident_Library!System.WorkItem.Incident"> <Component Path="$Target/Path[Relationship='Custom_WorkItem_Library!System.WorkItemAssignedToUser']$" Alias="AssignedUser" /> <Component Path="$Target/Path[Relationship='Custom_WorkItem_Library!System.WorkItemAffectedUser']$" Alias="AffectedUser" /> </TypeProjection> </EntityTypes> </TypeDefinitions>

4. Define the friendly name to display in the console

<LanguagePacks> <LanguagePack ID="ENU" IsDefault="true"> <DisplayStrings> <DisplayStrings> <DisplayString ElementID="Xapity.Incident.TypeProjections"> <Name>Xapity Type Projections</Name> </DisplayString> <DisplayString ElementID="IncidentTypeProjection.AssignedToAffectedUser"> <Name>Incident (Assigned To and Affected User)</Name> <Description>Includes the Assigned To and Affected User component.</Description> </DisplayString> </DisplayStrings> </LanguagePack> </LanguagePacks> </ManagementPack>

5. Seal the management Pack and then import into Service Manager.

You should be able to use the Authoring Tool to seal the Management Pack

Note: if it does not open, then check your XML as there is most likely a typo somewhere. We now have an Incident (Assigned To and Affected User) combination class.


Common Reference Files

These are the more Cmmon Reference files that are used in Type Projections (it is not a complete list). By setting the version numbers to 7.5.0.0 there are no issues with different Update Release versions and they can be used on any Service Manager 2012 version.

System

<Reference Alias="System"> <ID>System.Library</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Affected user Assigned To User Closed By User Created By User Primary Owner Resolved By User Added By User (attachments) Related To Work Item About Config Item About Congfig Item (Service) Affects Service Has Analyst Comment Has File Attachment Has Notification Log Has Parent Work Item Has User Comment Is Related To Config Item Is Related To Work Item Trouble Ticket has Action Log

Knowledge <Reference Alias="Custom_Knowledge_Library"> <ID>System.Knowledge.Library</ID> <Version>7.5.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Contains Activity

<Reference Alias="Custom_Activity_Library"> <ID>System.WorkItem.Activity.Library</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

SLA <Reference Alias="Custom_SLA_Library"> <ID>System.SLA.Library</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Incident

<Reference Alias="Custom_Incident_Library"> <ID>System.WorkItem.Incident.Library</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Problem

<Reference Alias="Custom_Problem_Library"> <ID>System.WorkItem.Problem.Library</ID> <Version>7.5.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Change

<Reference Alias="Custom_Change_Library"> <ID>System.WorkItem.ChangeRequest.Library</ID> <Version>7.0.6555.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Service Request

<Reference Alias="Custom_ServiceRequest_Library"> <ID>System.WorkItem.ServiceRequest.Library</ID> <Version>7.5.2905.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Release Management

<Reference Alias="Custom_ReleaseManagement_Library"> <ID>ServiceManager.ReleaseManagement.Library</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>

Release Record

<Reference Alias="Custom_ReleaseRecord_Library"> <ID>System.WorkItem.ReleaseRecord.Library</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Portal

<Reference Alias="Custom_ServiceManager_Portal"> <ID>Microsoft.SystemCenter.ServiceManager.Portal</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

SystemCenter ConfigurationManager

<Reference Alias="Custom_SystemCenter_ConfigurationManager"> <ID>Microsoft.SystemCenter.ConfigurationManager</ID> <Version>7.5.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Supporting Item Library

<Reference Alias="Custom_SupportingItem_Library"> <ID>System.SupportingItem.Library</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Windows_Library

<Reference Alias="Custom_Windows_Library"> <ID>Microsoft.Windows.Library</ID> <Version>7.5.0.0</Version> <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> </Reference>

Free Download - Sample Type Projection Management Packs

Xapity have created sealed example Type Projection Management Packs for the major SCSM Work Items. These are available as a free download from here

Need more information on SCSM Type Projections... See our SCSM Type Projections Xapity Reference Guide (PDF)

Xapity - Innovative Software for SCSM - Discover our Products

#SCSM #Tips #TypeProjections

Featured Posts
Recent Posts
Archive
Search By Tags
No tags yet.

© 2020 Xapity PTY LTD ABN: 81 611 883 482

  • White RSS Icon
  • White YouTube Icon
  • White Vimeo Icon
  • Facebook Clean
  • Twitter Clean