Class icm.model.WorkItemEditable


Extends ecm.model._ModelObject.
Represents the scratchpad state for editing a work item.
Defined in: <icm/model/WorkItemEditable.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Constructs a WorkItemEditable object.

Field Summary

Field Attributes Field Name and Description
 
The comment of the step.
 
Will be non-null if integrating with an external data service
 
The WorkItem object corresponding to this Editable object.
 
The collection of PropertyEditable objects that represent the step parameters of this step.
 
The currently selected step response.

Method Summary

Method Attributes Method Name and Description
 
abortStep(callback, errCallback, backgroundRequest)
Aborts the step.
 
completeStep(callback, errCallback, backgroundRequest)
Completes the step.
 
Returns the workflow authored map name.
 
Returns the Case object associated with the work item.
 
Returns the folder Id of the Case associated with this work item.
 
Returns the Id of the task associated with this work item.
 
Returns the CaseType object that is the case type of the Case associated with the work item.
 
Returns the deadline of the step.
 
Returns the instruction of the step.
 
Returns the launch date of the step.
 
Indicates if the step is locked and by whom.
 
Returns the workflow map name.
 
Returns the originator.
 
Returns the overdue status of the step.
 
getProperty(provider, symbolicName)
Obtains the PropertyEditable from the propertiesCollection property with the given provider and symbolic name.
 
Returns the reminder of the step.
 
Returns the possible responses of the step.
 
Returns the Id of the step.
 
Returns the step name.
 
Returns the page to process the step.
 
Gets the subject of the workflow.
 
getViewDefinitionUri(viewDefinitionId)
Returns the view definition URI.
 
Returns the workflow name.
 
Returns the workflow number.
 
Indicates if retrieveDependentProperties() should be called to resolve dependent properties on the server.
 
Indicates if the step is locked by the current user.
 
lockStep(callback, errCallback, backgroundRequest)
Locks the step.
 
Called when the entire state of the object is refreshed, primarily when the attributes have been updated based on updated information from the server.
 
Retrieves all attachment contents of all attachment fields at once.
 
retrieveAttributes(callback, errCallback, backgroundRequest)
Retrieves all attributes for this WorkItem object.
 
retrieveCachedAttributes(callback, errCallback, backgroundRequest)
Ensures that the full set of attributes has been retrieved.
 
retrieveDependentProperties(callback, errCallback, backgroundRequest)
Resolves dependent properties with the server.
 
retrieveNextItem(callback)
Returns the next item in the resultset that this WorkItemEditable object was originally obtained from.
 
retrieveStep(callback, errCallback, backgroundRequest)
Fully retrieves the properties of the step.
 
saveStep(callback, errCallback, backgroundRequest)
Saves the step.
 
setComment(commentText)
Sets the comment of the step.
 
Sets the step response

Constructor Detail

icm.model.WorkItemEditable(properties)

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

Field Detail

comment

The comment of the step.

externalDataIdentifier

Will be non-null if integrating with an external data service

icmWorkItem

The WorkItem object corresponding to this Editable object.

propertiesCollection

The collection of PropertyEditable objects that represent the step parameters of this step.

selectedResponse

The currently selected step response.

Method Detail

abortStep(callback, errCallback, backgroundRequest)

Aborts the step. This method is a convenience to calling abortStep() on the icm.model.WorkItem object and then obtaining this WorkItemEditable object. Both this WorkItemEditable object and its associated icm.model.WorkItem object are updated to reflect the updated state.
Parameters:
callback
Callback function called with this object as an argument when the request completes.
errCallback
Callback function called when the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

completeStep(callback, errCallback, backgroundRequest)

Completes the step. Neither this WorkItemEditable object nor the WorkItem object associated with it is updated. The step is complete and these objects should be discarded.
Parameters:
callback
a function called with this object when the request completes.
errCallback
Callback function called when the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

getAuthoredMapName()

Returns the workflow authored map name. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
The authored map name

getCase()

Returns the Case object associated with the work item. This is a convenience method equivalent to calling getCase() on the WorkItem object associated with this WorkItemEditable.
Returns:
icm.model.Case

getCaseFolderId()

Returns the folder Id of the Case associated with this work item. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
(string) GUID of the folder

getCaseTaskId()

Returns the Id of the task associated with this work item. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
(string) GUID of the task

getCaseType()

Returns the CaseType object that is the case type of the Case associated with the work item. This is a convenience method equivalent to calling getCaseType() on the WorkItem object associated with this WorkItemEditable.
Returns:
icm.model.CaseType

getDeadline()

Returns the deadline of the step. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
the deadline

getInstruction()

Returns the instruction of the step. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
The instruction of the step.

getLaunchDate()

Returns the launch date of the step. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
the launch date

getLockedBy()

Indicates if the step is locked and by whom. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
(string) The user name if it is locked

getMapName()

Returns the workflow map name. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
the map name

getOriginator()

Returns the originator. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
the originator.

getOverdueStatus()

Returns the overdue status of the step. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
the overdue status.

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.

getReminder()

Returns the reminder of the step. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
the reminder

getResponses()

Returns the possible responses of the step. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
(array of string)

getStepId()

Returns the Id of the step. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
The step Id

getStepName()

Returns the step name. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
(string)

getStepPage()

Returns the page to process the step. This is a convenience method equivalent to calling getStepPage on the icm.model.WorkItem object this object is attached to.
Returns:
the step page.

{string} getSubject()

Gets the subject of the workflow. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
{string}

getViewDefinitionUri(viewDefinitionId)

Returns the view definition URI. This is a convenience method equivalent to calling getViewDefinitionUri on the icm.model.WorkItem object this object is attached to.
Parameters:
viewDefinitionId
Returns:
the view definition URI.

getWorkflowName()

Returns the workflow name. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
the workflow name

getWorkflowNumber()

Returns the workflow number. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
the workflow number.

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)

isLockedByCurrentUser()

Indicates if the step is locked by the current user. This method is a convenience to accessing the icm.model.WorkItem object this WorkItemEditable is associated with.
Returns:
(boolean) True if locked by the current user.

lockStep(callback, errCallback, backgroundRequest)

Locks the step. This method is a convenience to calling lockStep() on the icm.model.WorkItem object and then obtaining this WorkItemEditable object. Both this WorkItemEditable object and its associated icm.model.WorkItem object are updated to reflect the updated state.
Parameters:
callback
Callback function called with this object as an argument when the request completes.
errCallback
Callback function called when the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

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.

retrieveAllAttachmentContents(callback)

Retrieves all attachment contents of all attachment fields at once. Calling this method will optimize the call to retrieve the ContentItem objects associated with each PropertyEditable object that can be more efficient than calling the retrieveAttachmentContents() method of each PropertyEditable object individually.
Parameters:
callback
Callback function called with this WorkItemEditable object as an argument when the request completes.

retrieveAttributes(callback, errCallback, backgroundRequest)

Retrieves all attributes for this WorkItem object. For a WorkItem, all of the attributes are retrieved when a method such as retrieveStep(), lockStep() etc. is called. Calling this method is equivalent to calling retrieveStep() without locking it.

This method is a convenience to calling retrieveAttributes() on the icm.model.WorkItem object and then obtaining this WorkItemEditable object. Both this WorkItemEditable object and its associated icm.model.WorkItem object are updated to reflect the retrieved state.

Parameters:
callback
Callback function called with this object as an argument when the request completes.
errCallback
Callback function called when 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 has already been retrieved, the callback is called right away. Otherwise retrieveAttributes() is called to retrieve all the attributes.

This method is a convenience to calling retrieveCachedAttributes() on the icm.model.WorkItem object and then obtaining this WorkItemEditable object. If the full attributes have not yet been cached, both this WorkItemEditable object and its associated icm.model.WorkItem object are updated to reflect the retrieved state.

Parameters:
callback
Callback function called with this object as an argument when the request completes.
errCallback
Callback function called when the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

retrieveDependentProperties(callback, errCallback, backgroundRequest)

Resolves dependent properties with the server. This method should be called whenever the value of a PropertyEditable object is modified and that property has the hasDependentProperties property set to true.
Parameters:
callback
Callback function called with this object as an argument when the request completes.
errCallback
Callback function called when the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

retrieveNextItem(callback)

Returns the next item in the resultset that this WorkItemEditable object was originally obtained from. This method can only be called if this WorkItemEditable was obtained from a WorkItem that was obtained by calling WorkItem.fromWorkItem() passing in an ecm.model.WorkItem that was obtained from a ResultSet. If not obtained from a ResultSet, this method will pass null to the callback function.

From the next WorkItemEditable, retrieveNextItem() can be called again to repeatedly obtain the next WorkItemEditable until no more work items can be found. Items that are locked by a different user are skipped.

Calling retrieveNextItem() again from this same WorkItemEditable object will call the callback function with a new instance of icm.model.WorkItemEditable. This may or may not represent the same work item that was returned previously depending on if the work item has been processed or not. Typically when processing next items, you will retrieve the next items until no more are available but you will not start over from earlier in the list. If non-default processing of the list is desired, the work item objects should be cached by the application and managed outside of this class.

Parameters:
callback
A callback function called with the next work item. It is passed an icm.model.WorkItemEditable object for the next item or null if there is no next item.

retrieveStep(callback, errCallback, backgroundRequest)

Fully retrieves the properties of the step. This method is a convenience to calling retrieveStep() on the icm.model.WorkItem object and then obtaining this WorkItemEditable object. Both this WorkItemEditable object and its associated icm.model.WorkItem object are updated to reflect the retrieved state.
Parameters:
callback
a function called with this object when the request completes.
errCallback
Callback function called when the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

saveStep(callback, errCallback, backgroundRequest)

Saves the step. The icm.model.WorkItem object associated with this WorkItemEditable object is also updated to reflect the saved state.
Parameters:
callback
a function called with this object when the request completes.
errCallback
a function called when the request fails
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

setComment(commentText)

Sets the comment of the step.
Parameters:
commentText
the text of the comment

setSelectedResponse(response)

Sets the step response
Parameters:
response
the step response