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

<operation-name>

Contains the name of the operation: find-task

Yes

<proxy-settings>

Specifies the parent tag that contains the proxy server information

No

<host>

Specifies the IP or host name of the proxy server

Conditional; required only if <proxy-settings> is provided

<port>

Specifies the port on which the proxy server listens for requests

Conditional; required only if <proxy-settings> is provided

<user-name>

Specifies the user name for the proxy server authentication

No

<password>

Specifies the password that corresponds to the proxy server<user-name>

You can encrypt the password by specifying the encryption-type attribute.

For example: <password encryption-type = "Base64">cGFzc3dvcmQ=</password> 

Valid values for the encryption-type attribute: Base64, Plain (Default)

No

<connection-parameters>

Contains the <user-name> and <password> elements

The <connection-parameters> element is required if you want to override the default values for username and password provided in the adapter configuration. 

No
<user-name>Specifies the user name required to run the requestNo; required if <connection-parameters> is specified
<password>

Specifies the password that corresponds the <user-name>

You can encrypt the password by specifying the encryption-type attribute.

No; required if <connection-parameters> is specified

<arguments>

Specifies a list of arguments required for the operation

Yes

<All>

When <All> is specified, all the task records are retrieved.

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

<operation-name>

Contains the name of the operation: find-task

Yes

<proxy-settings>

Specifies the parent tag that contains the proxy server information

No

<host>

Specifies the IP or host name of the proxy server

Conditional; required only if <proxy-settings> is provided

<port>

Specifies the port on which the proxy server listens for requests

Conditional; required only if <proxy-settings> is provided

<user-name>

Specifies the user name for the proxy server authentication

No

<password>

Specifies the password that corresponds to the proxy server<user-name>

You can encrypt the password by specifying the encryption-type attribute.

For example: <password encryption-type = "Base64">cGFzc3dvcmQ=</password> 

Valid values for the encryption-type attribute: Base64, Plain (Default)

No

<connection-parameters>

Contains the <user-name> and <password> elements

The <connection-parameters> element is required if you want to override the default values for username and password provided in the adapter configuration. 

No
<user-name>Specifies the user name required to run the requestNo; required if <connection-parameters> is specified
<password>

Specifies the password that corresponds the <user-name>

You can encrypt the password by specifying the encryption-type attribute.

No; required if <connection-parameters> is specified

<arguments>

Specifies a list of arguments required for the operation

Yes

<query>

Specifies the query based on which the tasks will be updated 

If multiple matching tasks are found, all of them are updated.

No

<all>

Specifies the query based on which the tasks will be updated 

If multiple matching tasks are found, all of them are updated.

No

<update>

The elements nested within the <update> tag contain values for fields to be updated. If you do not specify <update> no change field is updated.

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>
Was this page helpful? Yes No Submitting... Thank you

Comments