Task Management
This section describes the adapter request and response for Task Management operations.
Find Task operation
The Find Task operation retrieves task details from the Service Now application.
The following table describes the elements for this request.
Adapter request elements for the Find Task operation
Element | Definition | Required |
---|---|---|
| Contains the name of the operation: find-task | Yes |
| Specifies the parent tag that contains the proxy server information | No |
| Specifies the IP or host name of the proxy server | Conditional; required only if |
| Specifies the port on which the proxy server listens for requests | Conditional; required only if |
| Specifies the user name for the proxy server authentication | No |
| Specifies the password that corresponds to the proxy server For example: | No |
<connection-parameters> | Contains the The | No |
<user-name> | Specifies the user name required to run the request | No; required if <connection-parameters> is specified |
<password> | Specifies the password that corresponds the You can encrypt the password by specifying the encryption-type attribute. | No; required if <connection-parameters> is specified |
| Specifies a list of arguments required for the operation | Yes |
| When | No |
The following figure displays a sample adapter request for the Find Task operation.
Sample <items>
XML for the Find Task operation
<items>
<item>
<change-request>CHG9000131</change-request>
</item>
</items>
The following figure describes the sample adapter request XML for the Find Task operation.
Sample adapter request for the Find Task operation
<service-now-request>
<operation-name>find-task</operation-name>
<arguments>
<change-request>CHG9000131</change-request>
</arguments>
</service-now-request>
The following figure displays the adapter response.
Adapter response for the Find Task operation
<service-now-response>
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<responses>
<response>
<metadata>
<count>2</count>
</metadata>
<item>
<metadata>
<status>success</status>
</metadata>
<parameters>
<active>1</active>
<approval>Not Yet Requested</approval>
<change-request>CHG9000131</change-request>
<contact-type>Phone</contact-type>
<description>again</description>
<escalation>Normal</escalation>
<impact>3 - Low</impact>
<knowledge>0</knowledge>
<made-sla>1</made-sla>
<number>CTASK0010002</number>
<opened-at>2015-02-03 05:11:16</opened-at>
<opened-by>System Administrator</opened-by>
<order>0</order>
<parent>CHG9000131</parent>
<priority>4 - Low</priority>
<reassignment-count>0</reassignment-count>
<state>Open</state>
<sys-class-name>Change Task</sys-class-name>
<sys-created-by>admin</sys-created-by>
<sys-created-on>2015-02-03 05:11:21</sys-created-on>
<sys-domain>global</sys-domain>
<sys-id>427e767809823100064b1c18d231c23a</sys-id>
<sys-mod-count>0</sys-mod-count>
<sys-updated-by>admin</sys-updated-by>
<sys-updated-on>2015-02-03 05:11:21</sys-updated-on>
<upon-approval>Proceed to Next Task</upon-approval>
<upon-reject>Cancel all future Tasks</upon-reject>
<urgency>3 - Low</urgency>
</parameters>
</item>
<item>
<metadata>
<status>success</status>
</metadata>
<parameters>
<active>1</active>
<approval>Not Yet Requested</approval>
<change-request>CHG9000131</change-request>
<contact-type>Phone</contact-type>
<escalation>Normal</escalation>
<impact>3 - Low</impact>
<knowledge>0</knowledge>
<made-sla>1</made-sla>
<number>CTASK0010001</number>
<opened-at>2015-02-03 05:04:56</opened-at>
<opened-by>System Administrator</opened-by>
<order>0</order>
<parent>CHG9000131</parent>
<priority>4 - Low</priority>
<reassignment-count>0</reassignment-count>
<state>Open</state>
<sys-class-name>Change Task</sys-class-name>
<sys-created-by>admin</sys-created-by>
<sys-created-on>2015-02-03 05:05:01</sys-created-on>
<sys-domain>global</sys-domain>
<sys-id>550d727809823100064b1c18d231c285</sys-id>
<sys-mod-count>0</sys-mod-count>
<sys-updated-by>admin</sys-updated-by>
<sys-updated-on>2015-02-03 05:05:01</sys-updated-on>
<upon-approval>Proceed to Next Task</upon-approval>
<upon-reject>Cancel all future Tasks</upon-reject>
<urgency>3 - Low</urgency>
</parameters>
</item>
</response>
</responses>
</service-now-response>
Update Task operation
The Update Task operation updates the specified details for a task. To update a task, you must first query the change number to which the task is allocated and then update the task.
The following table describes the elements for this request.
Adapter request elements for the Update Task operation
Element | Definition | Required |
---|---|---|
| Contains the name of the operation: find-task | Yes |
| Specifies the parent tag that contains the proxy server information | No |
| Specifies the IP or host name of the proxy server | Conditional; required only if |
| Specifies the port on which the proxy server listens for requests | Conditional; required only if |
| Specifies the user name for the proxy server authentication | No |
| Specifies the password that corresponds to the proxy server For example: | No |
<connection-parameters> | Contains the The | No |
<user-name> | Specifies the user name required to run the request | No; required if <connection-parameters> is specified |
<password> | Specifies the password that corresponds the You can encrypt the password by specifying the encryption-type attribute. | No; required if <connection-parameters> is specified |
| Specifies a list of arguments required for the operation | Yes |
| Specifies the query based on which the tasks will be updated | No |
| Specifies the query based on which the tasks will be updated | No |
| The elements nested within the | No |
The following figure displays a sample adapter request for the Update Task operation.
Sample <items>
XML for the Update Task operation
<items>
<item>
<query>
<change-request>CHG0030024</change-request>
</query>
<update>
<state>Open</state>
<priority>2 - High</priority>
</update>
</item>
</items>
The following figure describes the sample adapter request XML for the Update Task operation.
Sample adapter request for the Update Task operation
<service-now-request>
<operation-name>update-task</operation-name>
<arguments>
<query>
<change-request>CHG0030024</change-request>
</query>
<update>
<state>Open</state>
<priority>2 - High</priority>
</update>
</arguments>
</service-now-request>
Comments
Log in or register to comment.