ITIL Methodology

This article contains the following topics:
casm172
This article contains the following topics:
By default, the Web Services fully support the ITIL methodology. CA SDM ITIL features let you take advantage of the ITIL methodology.
Incident or Problem Creation
CA SDM supports ITIL methodology so that incidents and problems can be created using the CA SDM Web Services. Both incidents and problems are held in the cr (Call_Req) object. Its
type
attribute distinguishes the record as an incident, problem, or request. To create an incident, problem, or request, call createRequest and specify the appropriate value for the type attribute.
The type attribute is a pointer (SREL) to the crt (Call_Req_Type) object, so you must pass a handle as the value.
The following code examples illustrate how to create an incident or problem by passing the correct crt object handle to the createRequest method. Setting the
type
attribute in the name-value pair that is passed as a parameter to createRequest, creates the tickets:
Example: Syntax for a Problem
attrVals = {"summary", "A new problem", "description", "new problem", "type", "crt:181", "catagory", "pcat:40002"} USPSD.createRequest(SID, creatorHandle, attrVals, template, new String[0], new String[0])
All the workflow tasks that are attached to a category are available for a problem. The workflow task is selected on the configuration of CA Process Automation or Classic workflow.
Example: Syntax for an Incident
attrVals = {"summary", "A new incident", "description", "new incident", "type", "crt:182", "catagory", "pcat:40002"} USPSD.createRequest(SID, creatorHandle, attrVals, template, new String[0], new String[0])
All the workflow tasks that are attached to a category are available for an incident. The workflow task is selected on the configuration of CA Process Automation or Classic workflow.
Query for Incidents or Problems
To retrieve incidents or problems, include the
type
attribute of the cr object in the where clause. The following example illustrates a where clause for retrieving all active Incidents. This where clause could be used with methods that perform queries for ‘cr’ objects, such as doSelect and doQuery:
type.id = 182 AND active = 1
The ‘182’ is the ID portion of the handle representing Incident types.
For more information, see the crt (Call_Req_Type) objects table illustrated in Default Handles. For more information about forming proper queries, see WHERE Clause.
Attach an Incident to a Problem
You can associate one or more incidents to a problem. The problem attribute of an incident relates the incident to a problem.
Example: Associate an Incident to a Problem
This example demonstrates how to relate a newly created incident to an existing problem.
To associate the incident to the problem, use UpdateObject to set the problem attribute of the incident. The following example code sets the problem attribute to the handle of an existing problem ticket:
attributeValues = {"problem", "cr:12346"} USPSD.UpdateObject(SID, incidentHandle, attributeValues, new String [0])
Attach a Problem to a Change Order
Incidents and problems can be linked to change orders with the attachChangeToRequest method. The following example code uses this method to simultaneously create a change order and attach it to a problem. In the example, “cr:12347” is the object handle of the problem -- it passes a blank handle for the fourth parameter, which causes the method to create a change:
UPSPSD.attachChangeToRequest(SID, creatorHandle, "cr:12347", "", new String[0], "activity description")
Change Order Creation
CA SDM supports ITIL methodology so that a Change Order can be created using the CA SDM Web Services. Change Order are held in the chg (Change_Request) object. To create an change order, call createRequest and specify the appropriate value for the type attribute. The following code examples illustrate how to create a change order: 
Example: Syntax for a Change Order
attrVals = {"summary", "A new change order", "description", "new change order","catagory", "chgcat:400002"}
USPSD.createChangeOrder(SID,creatorHandle,attrVals,template,new String[0], new String[0])
Issue Creation
CA SDM supports ITIL methodology so that an Issue can be created using the CA SDM Web Services. Issue are held in the iss (Issue) object. To create an Issue, call createRequest and specify the appropriate value for the type attribute. The following code examples illustrate how to create an change order:
Example: Syntax for Issue
attrVals = {"summary", "A new Issue", "description", "new Issue", "catagory", "isscat:400002"} 
USPSD. createIssue(SID,creatorHandle,attrVals,template,new String[0], new String[0])
Configuration Items
ITIL methodology uses the term
configuration item
(CI) to refer to hardware, software, and other IT resources. This term refers to the “nr” object stored in the CA Technologies-owned resource database table. All methods that use
asset
objects also work with CIs. This is only a difference in terminology.