ServiceGrid Article - The troubleshooting XSLT

From DocWiki

Jump to: navigation, search

Overview

When implementing Bridge connections in ServiceGrid and when customizing a new CallDetail, even in cases of deep-level analysis of the history of a ticket, there is a need for the full view of the content of "all" fields of a particular call.Typically, you would need to create a new CallDetailsetup with the fields you would like to see and make them available for one ore more users. But for a full view, this will be too time consuming and impractical also. Instead, there is a simple XSLT that you can use.

For that, you need to create a new XSLT template with a content type XML and the direction outbound. It also needs to be active (of course). To use for troubleshooting, you need to assign it to the appropriate CallSystem(s). Then, you are able to select it from a call by clicking on the view button. For this, you need to make the View Button available in the CallDetail you use. You can also use the View button in the CallHistory. The XML output always reflects the ticket at the selected history record.As a result, you could get a full, detailed view of the ticket and all its information at every step of its history.

What is the content of the XSLT? Here it is:

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="SD.call">
    <SD.call-XML>
       <xsl:call-template name="CALL" />
    </SD.call-XML>
</xsl:template>
<xsl:template name="CALL">
    <SD.call>
       <xsl:copy-of select="*" />
<SD.call>
</xsl:template>
</xsl:stylesheet> 


When saving, the properties of this template will be: "UsedStructure" as "Calls". This generates an output containing about 1280 fields regardless of whether there is content in them or not. For easier reference, you can download a sample output file here (right-click and save as). If you need additional fields, like the CallHistory or CallExtensions, you need to slightly amend the XSLT above.

Take a look at the following sample:

<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="SD.call">
<SD.call-XML>
          <xsl:call-template name="CALL" /> 
      </SD.call-XML> 
  </xsl:template>              <xsl:template name="CALL">
      <SD.call>
          <xsl:copy-of select="*" />
      </SD.call>
  </xsl:template>    <xsl:template name="CallNotes">
  </xsl:template>    <xsl:template name="DUMMY">
      <SD.call>
          <xsl:value-of select="SD.call/Children/ID" />
      </SD.call>
  </xsl:template>
  <xsl:template name="ParentCall">
  </xsl:template>
  <xsl:template name="Location">
  </xsl:template>
  <xsl:template name="MainComponent">
  </xsl:template>
  <xsl:template name="CallHistory">
  </xsl:template>
</xsl:stylesheet>

First, the properties of this template have a different UsedStructure. You can download a sample output of this second XML here (right-click and save as).



For a complete list of Cisco ServiceGrid Articles, go to the List of Articles page.

Rating: 0.0/5 (0 votes cast)

Personal tools