Class ecm.model.WorkItemProcessor


Extends ecm.model._ModelObject.
Provides methods to get the next or previous workitem from its result set given the current loaded work item. The work item must contains a resultSet.
Defined in: <ecm\model\WorkItemProcessor.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Fields borrowed from class ecm.model._ModelObject:
categorization, id, isRecurring, name, nameFilter, pane, status, type, userId

Method Summary

Method Attributes Method Name and Description
 
constructor(workItem)
 
getCMWorkItem(workItem, callback)
 
getNextItem(callback)
Returns the next item in the result set by calling the callback.
 
getP8WorkItem(workItem, callback)
Retrieves additional processor information for the work item.
 
getPreviousItem(callback)
Returns the previous item in the result set by calling the callback.
Methods borrowed from class ecm.model._ModelObject:
destroy, getSortCriteria, onChange, own, refresh, toString

Constructor Detail

ecm.model.WorkItemProcessor()

Since:
2.0.2

Method Detail

constructor(workItem)

Parameters:
workItem

getCMWorkItem(workItem, callback)

Parameters:
workItem
callback

getNextItem(callback)

Returns the next item in the result set by calling the callback. Consecutive calls will keep fetching the next work item until there isn't any item found. Items that are locked by a different users will be skipped.
Parameters:
callback
A callback function called with the next work item. It passes back the ecm.model.WorkItem object or null as a parameter.

getP8WorkItem(workItem, callback)

Retrieves additional processor information for the work item. If the work item is currently locked by a different user then it will return a null work item back in the callback. Otherwise, the returned work item will be populated with the additional processor information.
Parameters:
workItem
A ecm.model.WorkItem object.
callback
A callback function called after the work item have been populated with the additional processor information. It passes back the ecm.model.WorkItem object or null as a parameter.

getPreviousItem(callback)

Returns the previous item in the result set by calling the callback. Consecutive calls will keep fetching the next previous work item until it reaches the first item in the result set. For P8, items that are locked by a different users will be skipped.
Parameters:
callback
A callback function called with the previous work item. It passes back the ecm.model.WorkItem object or null as a parameter.