Find Task operation

The Find Task operation retrieves a task record.

The following table describes the elements of the <items> XML element and the adapter request. If not specified, the valid value for an element is assumed to be a string.

Elements for the <items> XML element and adapter request for the Find Task operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation: retrieve-change-task

Yes

<model>

Contains the other elements in the request

Yes

<keys>

Contains elements that uniquely identify a record

If you do not specify the child elements of the <keys> element, the application tries to find <task-number> in the <instance> element.

You can specify the values for <task-number> in the <keys> element, in the <instance> element, or in both elements.

Yes

<instance>

Specifies a unique record

The children of the <instance> element describe the fields of the record.

The only two higher-level elements are <keys> and <instance>. All other elements are child elements of the <instance> element.

Yes

<header>

Specifies the header information of the change record; is a structure-type element

Yes

<task-number>

Specifies the number associated with a task

The <task-number> element is used as the key.

Valid value: Any unique string.

No

<category>

Specifies the category of the change record

Valid values:

  • Create group
  • Create Release
  • Delete Group
  • Hardware
  • Identify Affected Systems
  • Maintenance
  • Network
  • Software
  • Update Affected Systems
  • Update Group

No

<status>

Specifies the status of a task

Valid values:

  • initial
  • waiting
  • reopened
  • closed
  • Any string

No

<assigned-to>

Specifies the name of the person to whom the task is assigned

Valid value: Any string, or an existing contact record

No

<assignee-dept>

Specifies the department of the assignee.

Valid values: Any string, or you can select any existing contact record.

No

<coordinator>

Specifies the name of the person coordinating the task

Valid value: Any string, or an existing contact record

No

<coordinator-phone>

Specifies the phone number of the coordinator for the change

Valid value: Any string

No

<planned-start-date>

Specifies the planned start date for the task

Valid value: Date and time in the YYYY.MM.DD HH:MM:SS format
For example: 2008.11.01 08:00:00

No

<planned-end-date>

Specifies the planned end date for the task

Valid value: Date and time in the YYYY.MM.DD HH:MM:SS format
For example: 2008.11.01 08:00:00

Note: The <planned-end-date> value must be greater than the <planned-start-date> value.

No

<reason>

Specifies the reason for the task

Valid value: Any string

No

<phase>

Specifies the phase of a task

The valid value for <phase> depends on the category of the task record.

No

<date-entered>

Specifies the date when the task was created

Valid value: Date and time in the YYYY.MM.DD HH:MM:SS format
For example: 2008.11.01 08:00:00

No

<open>

Specifies whether the change record is in an open state

Valid values:

  • true (default): Indicates that the change record is open
  • false: Indicates that the change record is closed

    Note: If you specify an invalid value, it is replaced with the default value.

No

<originator>

Specifies the originator of the task

Valid value: Any string

No

<parent-change>

Specifies the change number of the parent change related to the task

No

<close-time>

Specifies the date on which the task was closed

The value of the <close-time> element is specified by the HP Service Manager application in the YYYY.MM.DD HH:MM:SS format.
For example, 2008.11.01 08:00:00.

You cannot specify your input to set the <close-time> field. However, you can use the <close-time> field to retrieve a record.

No

<company>

Specifies the name of the company

Valid value: Any string

No

<s-l-a-agreement-i-d>

Specifies the Service Level Agreement (SLA) ID of the task

No

<description-structure>

Specifies an array of descriptions for the change; is a structure type element

Yes

<description>

Specifies a description of the task; is an array-type element

No

<middle>

Specifies an array of descriptions for the change; is a structure-type element

Yes

<product-number>

Specifies the product number of the task

Valid value: Any string

No

<configuration-item>

Specifies the configuration item associated with the task

Valid value: An existing configuration item

No

<location>

Specifies the location associated with the change task

Valid value: Any string

No

<misc1>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc2>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc3>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc4>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc5>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc6>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc7>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc8>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc9>

Specifies miscellaneous information about the task

Valid value: Any string

No

<misc10>

Specifies miscellaneous information about the task

Valid value: Any string

No

<brief-description>

Specifies the title or a brief description of the task

Valid value: Any string

No

<downtime-start>

Specifies the date and time when the downtime related to the task started

Valid value: Date and time in the YYYY.MM.DD HH:MM:SS format

No

<downtime-end>

Specifies the date and time when the downtime related to the task ended

Valid value: Date and time in the YYYY.MM.DD HH:MM:SS format

No

<installation-date>

Specifies the installation date for the task

Valid value: Date and time in the YYYY.MM.DD HH:MM:SS format

No

<misc-array1>

Specifies a miscellaneous array element for the task

No

<misc-array2>

Specifies a miscellaneous array element for the task

No

<requested-units>

Specifies the requested units for the task

Valid value: Any string

No

<estimate-price>

Specifies the estimated price for implementing the change task

Valid value: Any string

No

<actual-units>

Specifies the actual units required for the task

Valid value: Any string

No

<actual-cost>

Specifies the actual cost of implementing the change task

Valid value: Any string

No

<actual-price>

Specifies the actual price for implementing the task

Valid value: Any string

No

<SLABreached>

Specifies whether the SLA related to the task was breached

Valid value: true, false

No

<next-s-l-a-expiration>

Specifies the date when the SLA related to the task expires

Valid value: Date and time format

No

<CIDown>

Specifies whether the configuration item related to the task is down

Valid value: true, false

No

<S-l-a-breached>

Specifies whether the SLA was breached

Valid value: true, false

No

<c-i-down>

Specifies whether the configuration item is down

Valid value: true, false

No

<asset>

Specifies the associated configuration item with the change record; is an array-type element

No

<close>

Specifies the closure information and comments for the task; is a structure-type element

Yes

<completion-code>

Specifies the completion code for the task

Valid value: Any decimal

No

<closing-comments>

Specifies the closure comments for the task; is an array-type element

No

<initial-assessment>

Specifies the initial assessment of the change task

Valid values:

  • 1: Enterprise
  • 2: Site/Dept
  • 3: Multiple Users
  • 4: User

No

<urgency>

Specifies the level of urgency for the change

Valid values:

  • 1: Critical
  • 2: High
  • 3: Average
  • 4: Low

No

<actual-start-date>

Specifies the date when the task was started

Valid value: Date and time format

No

<actual-end date>

Specifies the date when the task ended

Valid value: Date and time format

No

The following figure displays the sample adapter request for the Find Task operation.

Sample adapter request for the Find Task operation


 <hp-service-manager-request>
    <entity>change</entity>
    <entity-type>task</entity-type>
    <request>
      <operation-name>retrieve-change-task</operation-name>
      <parameters>
        <retrieve-change-task-request>
          <model>
            <keys>
            </keys>
            <instance>
              <header>
                <type>Structure</type>
              </header>
              <description-structure>
                <type>Structure</type>
              </description-structure>
              <middle>
                <type>Structure</type>
              </middle>
              <close>
                <type>Structure</type>
              </close>
            </instance>
          </model>
        </retrieve-change-task-request>
      </parameters>
    </request>
  </hp-service-manager-request>


The following figure displays an adapter response for the Find Task operation.

Sample adapter response for the Find Task operation


<hp-service-manager-response>
  <metadata>
    <count>14</count>
  </metadata>
  <responses>
    <response>
      <metadata>
        <count>14</count>
      </metadata>
      <item>
        <metadata>
          <status>success</status>
        </metadata>
        <parameters>
          <model>
            <keys>
              <task-number>
                <value>MyTask0051</value>
                <type>String</type>
              </task-number>
            </keys>
            <instance>
              <header>
                <type>Structure</type>
                <task-number>
                  <value>MyTask0051</value>
                  <type>String</type>
                </task-number>
                <category>
                  <value>Network</value>
                  <type>String</type>
                </category>
                <assignee-dept>
                  <value>Application</value>
                  <type>String</type>
                </assignee-dept>
                <phase>
                  <value>Network</value>
                  <type>String</type>
                </phase>
                <date-entered>
                  <value>2010.01.08 11:40:21</value>
                  <type>DateTime</type>
                </date-entered>
                <open>
                  <value>true</value>
                  <type>Boolean</type>
                </open>
                <parent-change>
                  <value>C10021</value>
                  <type>String</type>
                </parent-change>
              </header>
              <description-structure>
                <type>Structure</type>
                <description>
                  <type>Array</type>
                  <description>
                    <element>
                      <value>First line of change desc</value>
                      <type>String</type>
                    </element>
                  </description>
                </description>
              </description-structure>
              <middle>
                <type>Structure</type>
                <brief-description>
                  <value>tttttt</value>
                  <type>String</type>
                </brief-description>
                <asset>
                  <type>Array</type>
                  <asset>
                    <element>
                      <value>SAP</value>
                      <type>String</type>
                    </element>
                  </asset>
                </asset>
                <SLABreached>
                  <value>false</value>
                  <type>Boolean</type>
                </SLABreached>
                <s-l-a-breached>
                  <value>false</value>
                  <type>Boolean</type>
                </s-l-a-breached>
              </middle>
              <close>
                <type>Structure</type>
              </close>
              <initial-assessment>
                <value>1</value>
                <type>String</type>
              </initial-assessment>
              <urgency>
                <value>2</value>
                <type>String</type>
              </urgency>
              <uniquequery>header,number="MyTask0051"</uniquequery>
              <recordid>MyTask0051 - Network - approved - tttttt</recordid>
            </instance>
          </model>
          <status>SUCCESS</status>
          <message>Success</message>
          <schema-revision-date>2005.03.15 00:00:00</schema-revision-date>
          <schema-revision-level>0</schema-revision-level>
          <return-code>0</return-code>
        </parameters>
      </item>
     
      <item>...</item>
      ...
      <item>...</item>
      <item>...</item>
    </response>
  </responses>
</hp-service-manager-response>
Was this page helpful? Yes No Submitting... Thank you

Comments