TaskState

TaskState refers to a task object without detailed step information. A task is rendered in XML as a <task> element containing attributes and child elements. See also TaskWithSteps, the version of <task> that also contains step infromation.

Attributes

id
The ID of the task
currentStep (deprecated, now use currentSteps)
For an active task, the step that is currently being executed.
totalSteps
The total number of steps in the task.
failures
The total number of failures in this task. It's possible that a step fails multiple times, so this value can be higher than the number of steps.
state
The current state of the task: PENDING, QUEUED, EXECUTED, EXECUTING, STOPPED, DONE, or CANCELLED.
state2
The current state of the task (to allow backward compatibility): PENDING, QUEUED, EXECUTED, EXECUTING, FAILED, FAILING, STOPPED, STOPPING, ABORTED, ABORTING, DONE, CANCELLED, or SCHEDULED.

Child elements

<currentSteps>
For an active task, the steps that are currently being executed.
<description>
Textual description of the task.
<startDate>
The date when the task was started. Format: the ISO 8601 profile used in XML
<completionDate>
The date when the task was completed. Format: ISO 8601 profile used in XML
<metadata>
Contains entries from the metadata map. Each entry is an XML element, where the element name is the key of the entry, and the content is the value. Currently supported: application, environment and version

Example

<task id="f9e864f9-cf07-44b6-93d8-f526515f87fa" currentStep="0" totalSteps="2" failures="0" state="PENDING">
  <description>InitialDeploymentTask</description>
  <startDate>2012-06-28T12:22:55.741+0200</startDate>
  <completionDate>2012-06-28T12:22:55.741+0200</completionDate>
  <currentSteps>
    <current>0</current>
  </currentSteps>
  <metadata>
    <application>AnimalZoo-ear</application>
    <environment>0hostEnv0</environment>
    <version>1.0</version>
  </metadata>
</task>