Class icm.model.TaskEditable
Extends
ecm.model._ModelObject.
Represents the scratchpad state editing a task. For a new (discretionary) task, that state
includes potential launch step parameters of the associated workflow. If a launch step exists,
it is represented by an icm.model.LaunchStep object that is a sub-object of this object.
Defined in: <icm/model/TaskEditable.js>.
Constructor Summary
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
icm.model.TaskEditable(properties)
Constructs a TaskEditable object.
|
Field Summary
| Field Attributes | Field Name and Description |
|---|---|
|
The Task object corresponding to this Editable object.
|
|
|
The LaunchStep object that allows launch step parameters to be filled in if this Editable object
represents a new task.
|
|
|
Indicates a pending action is associated with this TaskEditable.
|
|
|
Indicates that this Editable object represents a new task that has not yet been saved.
|
|
|
A collection of icm.model.PropertyEditable objects that represent the properties that are defined for this task.
|
|
|
The TaskType object for this TaskEditable.
|
Method Summary
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
icm.model.TaskEditable.createNew(caseInst, taskType, callback, errCallback, backgroundRequest)
A factory method to get a TaskEditable object that represents a new Task.
|
| <static> |
icm.model.TaskEditable.fromTask(task)
A factory method that gets a TaskEditable object from a Task object.
|
|
Gets the page to add this new task.
|
|
|
getCase()
Returns the Case object associated with this TaskEditable.
|
|
|
Returns the CaseType associated with this TaskEditable.
|
|
|
The default view reference name for this task.
|
|
|
Convenience method to return an indicator of whether this task is a Todo.
|
|
|
getProperty(provider, symbolicName)
Obtains the PropertyEditable from the propertiesCollection property with the given
provider and symbolic name.
|
|
|
Returns the task Id.
|
|
|
Returns the task name.
|
|
|
Convenience method to return the task type name.
|
|
|
getViewDefinitionUri(viewDefinitionId)
Returns the URI for the specified view definition.
|
|
|
Indicates if retrieveDependentProperties() should be called to resolve
dependent properties on the server.
|
|
|
Called when the entire state of the object is refreshed, primarily
when the attributes have been updated based on updated information
from the server.
|
|
|
refreshFromJSON(result, callback, errCallback, backgroundRequest)
Refreshes this object from the result obtained after submitting some changes to the server.
|
|
|
save(callback, errCallback, backgroundRequest)
Saves the task changes.
|
|
|
Establishes the intent to complete the task.
|
|
|
Establishes the intent to disable the task.
|
|
|
Establishes the intent to enable the task.
|
|
|
Establishes the intent to restart the task.
|
|
|
Establishes the intent to start the task.
|
|
|
Establishes the intent to stop the task.
|
|
|
setTaskName(taskName)
Sets the task name of the task
|
|
|
toJSON()
|
Constructor Detail
icm.model.TaskEditable(properties)
Constructs a TaskEditable object. A TaskEditable object is typically constructed internally
by other model objects.
- Parameters:
- properties
- The properties for the TaskEditable object. The properties can be any of the public fields as defined below and on ecm.model._ModelObject.
Field Detail
icmTask
The Task object corresponding to this Editable object. For a new task, the object cannot be
obtained until the Editable object is saved.
launchStep
The LaunchStep object that allows launch step parameters to be filled in if this Editable object
represents a new task.
pendingAction
Indicates a pending action is associated with this TaskEditable. When save() is called,
the pending action will be applied along with any modifications to task properties, etc.
This property should not be modified directly. Use the methods setDisabled(), setCompleted(),
etc. In all cases another pending action can not be applied if there is already a pending
action in effect.
This property can have the following values:
- create. A new task will be created when save() is called. The value of pendingCreate will also be true in this case.
- start. The task will be started when save() is called. Call setStarted() to enable this action.
- stop. The task will be stopped when save() is called. Call setStopped() to enable this action.
- restart. The task will be restarted when save() is called. Call setRestarted() to enable this action.
- enable. The task will be enabled when save() is called. Call setEnabled() to enable this action.
- disable. The task will be disabled when save() is called. Call setDisabled() to enable this action.
- complete. The task will be completed when save() is called. Call setCompleted() to enable this action.
pendingCreate
Indicates that this Editable object represents a new task that has not yet been saved.
If this property is true, the value of pendingAction is equal to "create". This property should
not be modified directly. It is set by the factory method TaskEditable.createNew(...)
and cleared when the new TaskEditable object is saved.
propertiesCollection
A collection of icm.model.PropertyEditable objects that represent the properties that are defined for this task.
taskType
The TaskType object for this TaskEditable. This is only set for a TaskEditable
that represents a new task.
Method Detail
<static> icm.model.TaskEditable.createNew(caseInst, taskType, callback, errCallback, backgroundRequest)
A factory method to get a TaskEditable object that represents a new Task.
The Task object does not exist and is not persisted until this TaskEditable
object is saved.
- Parameters:
- caseInst
- The icm.model.Case object that the new task is to be associated with.
- taskType
- An icm.model.TaskType object for the task type of the new task.
- callback
- Callback function called with a TaskEditable object when the request completes.
- 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.
<static> icm.model.TaskEditable.fromTask(task)
A factory method that gets a TaskEditable object from a Task object.
- Parameters:
- task
- the ecm.model.Task object
- Returns:
- icm.model.TaskEditable
getAddTaskPage()
Gets the page to add this new task.
- Returns:
- An object with the following properties:
- "pageType" = Identifies the page type as "stepLaunchPage".
- "pageTitle" = a title for the page. The title is the same as the page name.
- "pageClass" = a path used to access the resource for this page. For example: "<TOS>/<prefix>/CmAcmSTEP_LAUNCH_DEFAULT_PAGE"
- "pageName" = the name of the page, for example "CmAcmSTEP_LAUNCH_DEFAULT_PAGE"
getCase()
Returns the Case object associated with this TaskEditable.
- Returns:
- icm.model.Case object.
getCaseType()
Returns the CaseType associated with this TaskEditable.
- Returns:
- icm.model.CaseType object.
getDefaultViewDefinition()
The default view reference name for this task.
This is an empty string if no default view is defined for this task type
getIsToDo()
Convenience method to return an indicator of whether this task is a Todo.
If this represents a new (un-persisted) task, this is the indicator from the TaskType
associated at the time this TaskEditable was created. If this represents an existing task,
the Task object has this indicator.
getProperty(provider, symbolicName)
Obtains the PropertyEditable from the propertiesCollection property with the given
provider and symbolic name. The PropertyEditable objects in propertiesCollection are keyed
by the id of each PropertyEditable. In some cases that id could be different from the symbolic
name. This method is a shortcut to find the appropriate property object.
- Parameters:
- provider
- symbolicName
- Returns:
- PropertyEditable object if one exists with the given provider and symbolic name. Otherwise null.
getTaskId()
Returns the task Id. The task Id will only be returned if this represents
an existing case.
- Returns:
- The task id.
getTaskName()
Returns the task name.
- Returns:
- (string) The task name.
getTaskTypeName()
Convenience method to return the task type name. If this represents a new
(un-persisted) task, a TaskType object is associated at the time this TaskEditable
is created. If this represents an existing task, it has an associated Task object
which has a task type name.
getViewDefinitionUri(viewDefinitionId)
Returns the URI for the specified view definition.
- Parameters:
- viewDefinitionId
- the symbolic name for the view definition
isDependentPropertiesRetrievalPending()
Indicates if retrieveDependentProperties() should be called to resolve
dependent properties on the server. This method returns true if any
PropertyEditable objects in the properties collection have their
dependentsRetrievalPending property set to true.
- Returns:
- (boolean) True if any dependents retrieval is pending.
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.
refreshFromJSON(result, callback, errCallback, backgroundRequest)
Refreshes this object from the result obtained after submitting some changes to the server.
Those changes were represented by the payload obtained by calling toJSON(). After executing
these changes on the server, the result payload received from the server is then passed to this
method to refresh this object.
- Parameters:
- result
- callback
- errCallback
- backgroundRequest
save(callback, errCallback, backgroundRequest)
Saves the task changes.
- Parameters:
- callback
- Callback function called with this TaskEditable object as an argument when the request completes.
- 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.
setCompleted()
Establishes the intent to complete the task. This action is performed when the task is saved.
setDisabled()
Establishes the intent to disable the task. This action is performed when the task is saved.
setEnabled()
Establishes the intent to enable the task. This action is performed when the task is saved.
setRestarted()
Establishes the intent to restart the task. This action is performed when the task is saved.
setStarted()
Establishes the intent to start the task. The start action takes effect when this object
is saved.
setStopped()
Establishes the intent to stop the task. This action is performed when the task is saved.
setTaskName(taskName)
Sets the task name of the task
- Parameters:
- taskName
- The task name
toJSON()
Licensed Materials - Property of IBM (©) Copyright IBM Corp. 2013, 2016. All Rights Reserved.