Class icm.model.Task


Extends ecm.model.Item.
Represents a task.
Defined in: <icm/model/Task.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
icm.model.Task(properties)
Constructs a Task object.

Field Summary

Field Attributes Field Name and Description
 
A collection of AttributeDefinition objects that correspond to the current attributes that are loaded in the attributes property.
 
Indicates that this task is a container task.
 
The creator of the task.
 
The date the task was completed.
 
The date the task was created.
 
The date the task was modified last.
 
The date the task was started.
 
The default view reference name for this task.
 
The disabled state for the task.
 
Indicates that this task is a dynamic task.
 
The data for this dynamic task.
 
Indicates if the data for this dynamic task is valid.
 
The grouping value for the task (required/optional/disabled/dynamic).
 
hidden 
Indicates that this task is a hidden task.
 
isToDo 
Indicates if this task is a Todo.
 
The last failure reason for the task.
 
The last restart date for the task.
 
The corresponding task launch mode.
 
The parent Case of this task.
 
The corresponding task process instance ID.
 
The required state for the task.
 
The restart count for the task.
 
The roster name for the task.
 
The corresponding task state
 
The symbolic name of the task type of this task.

Method Summary

Method Attributes Method Name and Description
 
complete(callback, errCallback, backgroundRequest)
Completes the task.
 
Gets an Editable object in order to make scratchpad changes to the task and possibly save those changes.
 
disable(callback, errCallback, backgroundRequest)
Disables the task.
 
enable(callback, errCallback, backgroundRequest)
Enables the task.
 
Returns the CaseType of the parent Case
 
Called when the entire state of the object is refreshed, primarily when the attributes have been updated based on updated information from the server.
 
restart(callback, errCallback, backgroundRequest)
Restarts the task.
 
retrieveAttributes(callback, errCallback, backgroundRequest)
Retrieves all attributes for the item.
 
retrieveCachedAttributes(callback, errCallback, backgroundRequest)
Ensures that the full set of attributes has been retrieved.
 
retrieveMileStones(callback, level, errCallback, backgroundRequest)
Retrieves the milestones of the task.
 
start(callback, errCallback, backgroundRequest)
Starts the task.
 
stop(callback, errCallback, backgroundRequest)
Stops the task.
 
updateDynamicTask(name, valid, flowData, callback, errCallback, backgroundRequest)
Updates a dynamic task

Constructor Detail

icm.model.Task(properties)

Constructs a Task object. A Task object is typically constructed internally by other model objects.
Parameters:
properties
The properties for the Task object. The properties can be any of the public fields as defined below and on ecm.model.Item or ecm.model._ModelObject.

Field Detail

attributeDefinitions

A collection of AttributeDefinition objects that correspond to the current attributes that are loaded in the attributes property.

container

Indicates that this task is a container task.

creator

The creator of the task.

dateCompleted

The date the task was completed.

dateCreated

The date the task was created.

dateLastModified

The date the task was modified last.

dateStarted

The date the task was started.

defaultViewDefinition

The default view reference name for this task. This is an empty string if no default view is defined for this task type

disabledState

The disabled state for the task.

dynamic

Indicates that this task is a dynamic task.

dynamicData

The data for this dynamic task.

dynamicDataValid

Indicates if the data for this dynamic task is valid.

grouping

The grouping value for the task (required/optional/disabled/dynamic).

hidden

Indicates that this task is a hidden task.

isToDo

Indicates if this task is a Todo.

lastFailureReason

The last failure reason for the task.

lastRestartDate

The last restart date for the task.

launchMode

The corresponding task launch mode.

parentCase

The parent Case of this task.

processInstanceId

The corresponding task process instance ID.

requiredState

The required state for the task.

restartCount

The restart count for the task.

rosterName

The roster name for the task.

taskState

The corresponding task state

taskTypeName

The symbolic name of the task type of this task.

Method Detail

complete(callback, errCallback, backgroundRequest)

Completes the task. Only a Todo (isToDo is true) can be completed in this way and the current value of the taskState property must be READY or WORKING.
Parameters:
callback
a function called with icm.model.Task
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

createEditable()

Gets an Editable object in order to make scratchpad changes to the task and possibly save those changes. The changes are not permanent until save() is called on the Editable object.
Returns:
icm.model.TaskEditable

disable(callback, errCallback, backgroundRequest)

Disables the task.
Parameters:
callback
a function called with icm.model.Task
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

enable(callback, errCallback, backgroundRequest)

Enables the task.
Parameters:
callback
a function called with icm.model.Task
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

getCaseType()

Returns the CaseType of the parent Case
Returns:
icm.model.CaseType

onRefresh()

Called when the entire state of the object is refreshed, primarily when the attributes have been updated based on updated information from the server.

restart(callback, errCallback, backgroundRequest)

Restarts the task.
Parameters:
callback
a function called with icm.model.Task
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

retrieveAttributes(callback, errCallback, backgroundRequest)

Retrieves all attributes for the item. Depending on how the item was originally created, it might only contain a subset of the attributes. This function retrieves any additional missing attributes. For a Task object, if the object represents a dynamic task, then the dynamic task data is not retrieved if the object is initially part of a collection of objects, such as a result of calling Case.retrieveTasks(). Call this method to ensure that the data and any other attributes are loaded.
Parameters:
callback
a function that is called when the attribute retrieve has completed. This object is passed as an argument to the method.
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

retrieveCachedAttributes(callback, errCallback, backgroundRequest)

Ensures that the full set of attributes has been retrieved. If the full set of attributes has been retrieved, the callback function is called immediately. If the full set of attributes has not been retrieved, the retrieveAttributes() method is called to retrieve all of the attributes.
Parameters:
callback
A function that is called when the attribute retrieve has completed. This object is passed as an argument to the method.
errCallback
An optional argument. A function that is called if the request fails.
backgroundRequest
An optional argument. If true, indicates that the request is tp be processed in the background.

retrieveMileStones(callback, level, errCallback, backgroundRequest)

Retrieves the milestones of the task.
Parameters:
callback
a function called with an object containing a milestones array
level
An integer indicating the milestone level
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

start(callback, errCallback, backgroundRequest)

Starts the task.
Parameters:
callback
a function called with this icm.model.Task when the start operation completes successfully.
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

stop(callback, errCallback, backgroundRequest)

Stops the task.
Parameters:
callback
a function called with icm.model.Task
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

updateDynamicTask(name, valid, flowData, callback, errCallback, backgroundRequest)

Updates a dynamic task
Parameters:
name
the name of the task.
valid
a Boolean value that indicates whether the flow data specified is valid.
flowData
a string that contains the JSON representation of the flow data
callback
a function called with icm.model.Task
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.