The following parameters apply to the createRequest method:
|
Parameter |
Type |
Description |
|---|---|---|
|
SID |
Integer |
Identifies the session retrieved from logging in. |
|
creatorHandle |
String |
Identifies the handle of the contact responsible for the creation of the request (the log agent). Pass an empty string to specify the default CA SDM user. |
|
attrVals |
String[] |
Identifies an array of name-value pairs that is used to set the initial attribute values for the new request. Note: Dotted names are not permitted. |
|
propertyValues |
String[] |
Identifies the array of values for any properties that are attached to the new request. |
|
template |
String |
(Optional) Identifies the handle of the request template (cr_tpl) from which to create the request. |
|
attributes |
String[] |
Specifies the sequence of attribute names from the new object for which to return values. Dot-notation is permitted. If this field is empty, all value-based attribute values are returned. |
|
newRequestHandle |
String Holder |
Specifies the String Holder object for capturing returned data. See the XML Element Return list below for details. |
|
newRequestNumber |
String Holder |
Specifies the String Holder object for capturing returned data. See the XML Element Return list below for details. |
Description
Creates a CA SDM Request (cr) object. You must use this function to create a Request; do not use createObject().
propertyValues is a list of values for each Property object that will be attached to the new Request. The Properties that are attached are determined by the new Request’s ‘category’ attribute value. All properties created from the CA SDM Web Services interface will have a default value (for more information, see Categories and Properties), which is important because a Request will not save until all of its Properties marked “required” have a value.
You may override the default by supplying values for any properties that will be attached when the Request is created. You must supply this information before the Request is created, since createRequest() attempts to back-store the object you most recently create. Use getPropertyInfoForCategory() to get a list of properties for a specific Category. This function returns the properties in order of their ‘sequence’ attribute, which is the expected order of the propertyValues array. For example, if the sequences and symbols of the properties are as follows:
100 - Hard Drive Size
200 - CPU
300 - Memory
The propertyValues array, depending on the programming language, may appear as follows:
[“40 GB”, “Pentium 4 1.7 Ghz”, “256”]
getPropertyInfoForCategory() indicates which Properties are marked required.
If you do not set the Request category or do not want to set any Property values, pass an empty string for propertyValues.
If you do not want to rely on the default property values, the following is the suggested order for creating a new Request (or Issue or Change Order):
As an alternative to the previous procedure, you can retrieve the list of properties using getRelatedListValues() after createRequest() returns. Properties are stored in the ‘properties’ list for a Request.
Depending upon the application, it may be faster to at least cache the list of Categories, since this data does not change often at many client sites.
Note: By default, this method creates a Request. If you are using the ITIL methodology, you need to set the ‘type’ attribute in the attrVals array to define whether you are creating an Incident or a Problem ticket. For more information about ITIL procedures, see Note on Using the ITIL Methodology Installation.
Returns
Returns the new objects handle with all of its attribute values. List and LREL types are also returned, but as empty elements.
|
XML Element |
Type |
Description |
|---|---|---|
|
N/A |
Identifies the standard UDSObject element containing the handle and requested attribute values. |
|
|
<newRequestHandle> |
String |
Identifies the new request handle. |
|
<newRequestNumber> |
String |
Identifies the new request’s number (its “ref_num” attribute). |
|
Copyright © 2013 CA.
All rights reserved.
|
|