Supported Server Operations
This article contains the following topics:
This article contains the following topics:
The following operations are supported to let you integrate the CA SDM web pages with your web pages:
- CREATE_NEWProvides a generic interface to let the user create a row in a specified table. The object name must be specified, and by default a template nameddetail_xxx_edit.htmpl is used for objectxxx. You can override the .htmpl file by specifying the HTMPL property.
To use the HTMPL specifier with CREATE_NEW, the referenced form must have a name conforming to the naming convention zdetailxxx_factory.htmpl. The name must begin with the string zdetail, followed by any alphanumeric characters (including a null string), followed by an underscore and the factory name.
- Required specifiers:FACTORY=object-name
- Optional specifiers:ALG_PRESET=preset_expressionALG_PRESET_REL=preset_expressionCREATE_ALG=activity_log_typeHTMPL=zdetailxxx_factory.htmplKEEP.attr_name=valuePRESET=preset_expressionPRESET_REL=preset expressionSET.attr_name=valueuse_template=1 | 0 (0 is the default)
- ENDSESSION or LOGOUTEnds the current logged-in session. ENDSESSION is the preferred operation.
- GENERIC_LISTProvides a generic interface to allow the user to display a list from any table in the database. The object name must be specified, and by default a template named list_xxx.htmpl is used for objectxxx. You can override the .htmpl file by specifying the HTMPL property.
- Required specifiers:FACTORY=object-nameKEEP.attr_name=value
- DISPLAY_FORMProvides a generic interface to let the user display any customized form.
DISPLAY_FORM replaces JUST_GRONK_IT. Existing implementations can continue to use JUST_GRONK_IT, which functions exactly like DISPLAY_FORM. DISPLAY_FORM is the preferred operation.
- Required specifiers:HTMPL=htmpl_file
- MENUDisplays the main menu page, which is defined in the web.cfg file in the Menu property.
- Optional specifiers:HTMPL=menufilemenufileis the name of an alternate main menu file.
- PAGE_EXTENSIONAllows the webmaster to specify additional extensions to the interface.
- Required specifiers:NAME=html_filehtml_fileis one of the file names listed in the configuration file UserPageExtensions directive.
- Optional specifiers:REQUIRES_LOGIN=1If present, a login page appears first if the user is not currently logged in. If omitted or set to zero, the file is shown without checking if the user is currently logged in.
- RELOGDisplays the login page.
- SEARCHProvides a generic interface to allow the searching of any table in the database. This operation assumes that an appropriate search_xxx.htmpl has been created, wherexxxis theobject-name, as defined in the .maj files in the majic directory in bopcfg.For more information, see CA Service Desk Manager Reference Commands. By default, the results of this search are displayed in list_xxx.htmpl, but this can be overridden by specifying the HTMPL property.
- Required specifiers:FACTORY=object-nameQBE.op.attr_name=value
- Optional specifiers:ALG_PRESET=preset_expressionALG_PRESET_REL=preset_expressionCREATE_ALG=activity_log_typeHTMPL=list_htmpl_fileKEEP.attr_name=value
- SEC_REFRESHRefreshes the user access information from the security subsystem. A hyperlink for this operation is provided to users who have MODIFY privileges (for the admin functional group) on the menu screen. After updating user access privileges with the security program, this operation provides a means to refresh access information. (This operation refreshes the security information for all users.)Security refresh is an asynchronous process. When the security refresh is done, a message shows in the standard log file (stdlog).
- SET_MENUThe behavior of this operation is the same as MENU when MENU is used with the HTMPL variable. The only difference is that this operation also sets the default menu form to the menu form specified with the HTMPL property.
This operation overrides the MENU set in the web.cfg until the web service is restarted.
- Required specifiers:HTMPL=htmpl_file
- SHOW_DETAILProvides a generic interface to allow the user to display a read-only detail of a row in a specified table. The persistent ID name must be specified (from which the object name is inferred). By default, a template named detail_xxx_ro.htmpl is used for objectxxx. The .htmpl file can be overridden by specifying the HTMPL property.
- Required specifiers:PERSID=persistent-id
- Optional specifiers:ALG_PRESET=preset_expressionALG_PRESET_REL=preset_expressionCREATE_ALG=activity_log_typeHTMPL=readonly_detail_htmpl_file
- UPDATEProvides a generic interface to editing any table. The ID and object name must be passed in and a detail form that the user can edit is displayed to the user. By default, the user has exclusive access to the record for two minutes, and is guaranteed to get changes into the database if they are submitted in this time.
To use the HTMPL specifier with UPDATE, the referenced form must have a name conforming to the naming convention zdetailxxx_factory.htmpl. The name must begin with the string “zdetail”, followed by any alphanumeric characters (including a null string), followed by an underscore and the factory name.
- Required specifiers:PERSID=persistent-idorSET.id=id-of-row-to-updateFACTORY=object-name
- Optional specifiers:NEXT_PERSID=persistent-id(of record to display after successful update)KEEP.attr_name=valueKEY.attr_name=valueHTMPL=zdetailxxx_factory.htmpl
For information about web.cfg, see How to Configure the Web Interface.
This table lists the variables that can be set for each of the operations in the supported operations:
Specifies values for one or more of the attributes of the activity log created as a result of the CREATE_ALG variable. If CREATE_ALG is not specified, ALG_PRESET and ALG_PRESET_REL are ignored.
Specifies the activity log type of an activity log to be created as a side effect of the operation. Use the ALG_PRESET or ALG_PRESET variables to specify values for the attributes of the new activity log.
The timing of creation of the activity log depends on the operation, as follows:
CREATE_NEWThe activity log is created when the new record is saved. If the new record is not saved, no activity log is created.
SEARCHThe activity log is created when a record is selected from the list form. If the record is viewed instead of selected (that is, the user explicitly selects the View command from the list form's mouse-over menu), no activity log is created.
SHOW_DETAILThe activity log is created before the record is displayed.
Specifies the class of object to be searched, created, or updated. You can use any name specified as an OBJECT in the *.maj files in $NX_ROOT/bopcfg as listed in CA Service Desk Manager Reference Commands.
Allows the HTMPL author to override the default template naming convention and explicitly specify the HTMPL file to display, instead of the default template.
Note:When the HTMPL specifier is used with CREATE_NEW or UPDATE, the name of the referenced form must conform to the naming convention zdetailxxx_factory.htmpl, where xxx are any characters, and
factoryis the factory name.
Specifies the value that can be saved and passed between pages.
Similar to the SET.
attr_name, except that this specifies a lookup on
attr_name, which must be a reference to another table or object.
Specifies the persistent ID of the record to be displayed next.
Specifies the persistent ID of a record to be displayed. You can specify this in either of the following ways:
Directly, with a persistent ID consisting of a factory name, a colon (:), and a unique integer database ID. For example, PERSID=chg:1234, specifies the change order with database ID 1234.
Indirectly, with a persistent ID consisting of a factory name, a colon (:), an attribute name, a second colon (:), and a value. This form of PERSID specifies the record of the specified factory that has an attribute of the specified value. For example, PERSID=chg:chg_ref_num:demo:3 specifies the change order with reference number demo:3.
Specifies values for one or more of the attributes of the record created as a result of the CREATE_NEW variable. If CREATE_NEW is not specified, PRESET is ignored.
Specifies the values to use when performing a search. These values are identified using a QBE keyword, where
attr_nameidentifies any attribute name on a ticket that can be set and
opindicates to search where the attribute:
EQ is equal to the value
NE is not equal to the value
GT is greater than the value
LT is less than the value
GE is greater than or equal to the value
LE is less than or equal to the value
NU is null
NN is not null
IN matches the SQL LIKE expression
KY contains the text entered
If you do not define any QBE variables, the standard search window is displayed.
Specifies an attribute name to use when a ticket is created, where
attr_nameidentifies any attribute in a ticket that can be set. The attribute names will vary depending on the underlying object. All objects and their attributes can be found in the *.maj files in the majic directory in bopcfg as listed in CA Service Desk Manager Reference Commands.
Specifies the database ID of the row to be updated.
When set to 1, searches that result in 1 hit do not display the search result list. Instead, the read-only detail is displayed directly.
When set to 1, the SEARCH operation will return a list of templates. The returned template selected will be used in the CREATE_NEW operation to populate a new record. This variable is valid for change orders, issues, and requests.
Syntax of PRESET, PRESET_REL, ALG_PRESET, and ALG_PRESET_REL
The PRESET, PRESET_REL, ALG_PRESET and ALG_PRESET_REL keywords in the URL specify initial values for attributes of the ticket and its activity log, respectively. There are two possible formats:
- [ALG_]PRESET=attr:valueIndicates that the specified attribute of the ticket or activity log should be set to the specified value. For example, the following specification sets the description of the new ticket to “Hello:”PRESET=description:Hello
- [ALG_]PRESET_REL=attr:obj.relattr:testattr:valueIndicates that the specified attribute of the ticket or activity log should be set to a value copied from another database table. The value is copied from therelattrattribute of theobjwhosetestattrhas the specifiedvalue. For example, the following specification sets the analyst attribute of the new ticket to the ID of the contact with user ID xyz123:PRESET_REL=analyst:cnt.id:userid:xyz123When this format is used, the implied query must retrieve a unique record. If more than one contact has a user ID of xyz123 (or none), the example PRESET specification has no effect.
The PRESET, PRESET_REL, ALG_PRESET and ALG_PRESET_REL keywords can occur as many times as desired in a URL, allowing the setting of multiple attributes. Alternatively, a single keyword operand can specify multiple values separated by @@. If the '@@' separator is used, you cannot mix value formats for [ALG_]PRESET and [ALG_]PRESET_REL keywords. For example, the following example shows two different ways of specifying values for ticket description, summary and analyst:
PRESET=description:Hello+PRESET=summary:HelloThere+PRESET_REL=analyst:cnt.id:userid:xyz123 PRESET=description:[email protected]@summary:HelloThere+PRESET_REL=analyst:cnt.id:userid:xyz123
For requests, issues, incidents, problems, and change orders, both PRESET and PRESET_REL support a keyword attribute ASSET to link an object to an asset. The ASSET attribute updates the affected_resource attribute of a request, incident, or problem, or the asset LREL of an issue or change order.
The following link examples do not include the path to CA SDM. All CA SDM URLs begin with coding of the following form:
In this example,
hostnameis the name of your server and
port(optional) is the port number if you are using Tomcat. This coding is shown as an ellipsis (…) in the following URL examples:
- To create a request with an affected end user with the userid tooda01, use the following example URL:...?OP=CREATE_NEW+FACTORY=cr+PRESET_REL=customer:cnt.id:userid:tooda01
- To display a list of all requests assigned to userid tooda01, use the following example URL:...?OP=SEARCH+FACTORY=cr+QBE.EQ.assignee.userid=tooda01
- To display the detail form for request 1234, use the following example URLs:...?OP=SHOW_DETAIL+FACTORY=cr+PERSID=cr:ref_num:1234 (read-only view) ...?OP=UPDATE+FACTORY=cr+PERSID=cr:ref_num:1234 (update view)
You can bypass the logon challenge by using Web Services for authentication. For information about the getBopsid() method, see CA Service Desk Manager Reference Commands.