Class ecm.model.WorkItem
Extends
ecm.model.Item.
Represents a single work item from an IBM Content Manager repository or a workflow step from the IBM
FileNet P8 Process Engine.
Defined in: <ecm\model\WorkItem.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
ecm.model.WorkItem(properties)
Constructs a work item.
|
Field Summary
Field Attributes | Field Name and Description |
---|---|
A boolean which is true if the current user can reassign this work item.
|
|
A boolean which is true if the current user can return this work item to it's sender.
|
|
A boolean which is true if the current user can view the history information for this work item.
|
|
A boolean which is true if the current user can view the status information for this work item.
|
|
A string value defining the Process Engine connection point to use for this repository.
|
|
An instance of ecm.model.ContentItem for the work item.
|
|
The name of the extended EDS service property.
|
|
The attachment Id property value.
|
|
Initiating attachment name (if defined in the Workflow Definition).
|
|
The processor base URL.
|
|
The requested processor pop-up window height information.
|
|
The processor JSP location.
|
|
The processor URL template information.
|
|
The requested processor pop-up window width information.
|
|
The
vwVersion property value from the workflow definition content item. |
|
The object store containing the FileNet P8 content item.
|
|
The work items queue type property (userQueue or processQueue).
|
|
The queue name that the current work item resides in.
|
|
The work items sheet name property.
|
|
This flag is
true if this is a FileNet P8 repository and a checkout icon should be shown for
it because it has a reservation. |
|
The work items step name property.
|
|
The work items step tag property.
|
|
Set this flag to
true or can it be set to true with a URL parameter of same
name and it will over ride the base Url registered in Process Config Console for the application and start
the step processors from localhost. |
|
An instance of ecm.model.ContentClass for pseudo class of the work item.
|
|
The work items work class name property.
|
|
The workflow version property.
|
- Fields borrowed from class ecm.model.Item:
- attributes, dataObject, deleted, entryTemplateId, locked, lockedUser, mimetype, parent, privileges, repository, resultSet
- Fields borrowed from class ecm.model._ModelObject:
- categorization, id, isRecurring, name, nameFilter, pane, status, type, userId
Method Summary
Method Attributes | Method Name and Description |
---|---|
canReassign(callback)
Return true if the work item can be reassigned.
|
|
clone()
|
|
completeStep(attributes, dispatch, callback, synchronous, onError, backgroundRequest)
Complete a work item step.
|
|
createAttachmentId(item)
Create the attachment Id string in a format that the FileNet P8 Process Engine can recognize.
|
|
createSubject(item)
Create a default
F_Subject string in to be used when launching a work item. |
|
deleteTracker(lock, callback)
Delete a Tracker item from the queue.
|
|
editWorkflow(items, callback)
Edit a Content Manager document routing workflow.
|
|
Returns an instance of ecm.model.ContentClass for the pseudo content class associated with this work
item.
|
|
Returns an instance of a ecm.model.ContentItem created from the JSON for this work item.
|
|
Returns an instance of ecm.model.ContentClass for the pseudo class associated with this work items
list of custom parameters.
|
|
Returns true if this item has content.
|
|
Returns true if any attribute in the class is marked as having dependent attributes.
|
|
isAttributeHidden(attributeId)
Returns true if the specified attribute is hidden.
|
|
Returns true if this item has been declared as a record.
|
|
Returns true if the process queue this item is running in is a Tracker queue.
|
|
Returns true if the item is a system object.
|
|
isWorkflowRunning(item, callback)
Checks to see if the specified workflow is currently running in the Process Engine.
|
|
Returns true if this item is a workitem.
|
|
launchWorkflow(item, callback)
Launches a FileNet P8 workflow programmatically (no UI).
|
|
moveToInbox(callback, items, synchronous, onError, backgroundRequest)
Move this work item into my personal in-basket.
|
|
onChange(item)
This event is called for any change to the work item.
|
|
openFolderContent(callback, orderBy, descending)
Retrieves folder contents for Content Manager Worklist folders.
|
|
reassign(user, displayName, delegate, callback, items, synchronous, onError, backgroundRequest)
Reassign this work item to the specified user.
|
|
responseStep(attributes, dispatch, callback, synchronous, onError, backgroundRequest)
Complete a work item step with a specific response.
|
|
retrieveAttachments(callback)
Retrieves all attachments for a Step work item.
|
|
retrieveAttributes(callback)
Retrieves all attributes for the work item.
|
|
retrieveDependentParameters(attributes, callback, onError)
Retrieves attribute information similar to
ContentClass but updated or restricted according to
a list of attribute values. |
|
retrieveLaunchParameters(callback)
Retrieves all parameters for a launched work item.
|
|
retrieveMilestones(callback, milestoneLevel)
Retrieves milestone information for a work item.
|
|
retrieveProcessorInformation(type, callback, objectId, objectStoreName, synchronous, onError, backgroundRequest)
Retrieves the step or launch processor information for the specified work item.
|
|
retrieveStepParameters(callback, lockItem)
Retrieves all parameters for a Step work item.
|
|
retrieveSubscriptions(callback, isBackgroundRequest, onError)
Retrieves all workflow subscriptions that are associated to the object specified.
|
|
retrieveTrackerHistory(callback)
Retrieves history information for a Tracker item.
|
|
retrieveTrackerMilestones(callback, milestoneLevel, lockItem)
Retrieves milestone information for a Tracker item.
|
|
retrieveTrackerParameters(callback)
Retrieves parameters for a Tracker item.
|
|
retrieveTransferedWorkflows(callback, item, filterClassNames)
Retrieves all transferred workflows for the specified repository.
|
|
returnToSender(callback, synchronous, onError, backgroundRequest)
Return this work item to the previous sender.
|
|
setAttachmentId(id)
Sets the attachment id system parameter value.
|
|
setSubject(id)
Sets the subject system parameter value.
|
|
startWorkflow(items, callback)
Launches a Content Manager document routing workflow programmatically (no UI).
|
|
transferWorkflow(callback, item, workClassName)
Transfers a workflow definition into the process engine server (ready for execution).
|
|
unlockStep(abort, callback, synchronous, onError, backgroundRequest)
Unlocks a work item step.
|
- Methods borrowed from class ecm.model.Item:
- containsValue, getAttributeFormat, getAttributeType, getAttrLabel, getDisplayValue, getItemValue, getMimeClass, getModifyDate, getModifyUser, getPath, getStateClass, getUserInfo, getValue, getValues, hasAttribute, hasPrivilege, isAttributeReadOnly, isContentTiff, isDeclareRecordEntryTemplate, isDocumentEntryTemplate, isEntryTemplate, isFolder, isFolderEntryTemplate, isSystemProperty, setValue, setValues
- Methods borrowed from class ecm.model._ModelObject:
- destroy, getSortCriteria, own, refresh, toString
Constructor Detail
ecm.model.WorkItem(properties)
Constructs a work item.
- Parameters:
- properties
- The properties for the work item. The properties can be any of the public fields as defined below and on ecm.model.Item and ecm.model._ModelObject.
Field Detail
can_reassign
A boolean which is true if the current user can reassign this work item. (FileNet P8 only.)
can_return
A boolean which is true if the current user can return this work item to it's sender. (FileNet P8 only.)
can_view_history
A boolean which is true if the current user can view the history information for this work item. (FileNet P8
only.) only.
can_view_status
A boolean which is true if the current user can view the status information for this work item. (FileNet P8
only.)
connectionPoint
A string value defining the Process Engine connection point to use for this repository. (Optional)
This connection point overrides the connection point that is configured on this repository in the IBM Content Navigator administration tool.
contentItem
An instance of ecm.model.ContentItem for the work item. (Content Manager only.)
EDS_Service
The name of the extended EDS service property. (FileNet P8 only.)
F_AttachmentId
The attachment Id property value. Formated string used by Process Engine to identify attachment items.
(FileNet P8 only.)
F_InitiatingAttachment
Initiating attachment name (if defined in the Workflow Definition). (FileNet P8 only.)
F_StepBaseurl
The processor base URL. Can be from different web applications. (FileNet P8 only.)
F_StepHeight
The requested processor pop-up window height information. (FileNet P8 only.)
F_StepLocation
The processor JSP location. (FileNet P8 only.)
F_StepTemplate
The processor URL template information. The template is used to format the processor URL. (FileNet P8 only.)
F_StepWidth
The requested processor pop-up window width information. (FileNet P8 only.)
F_VWVersion
The
vwVersion
property value from the workflow definition content item. (FileNet P8 only.)
objectStore
The object store containing the FileNet P8 content item.
queue_type
The work items queue type property (userQueue or processQueue). (FileNet P8 only.)
queueName
The queue name that the current work item resides in. (FileNet P8 only.)
sheet_name
The work items sheet name property. (FileNet P8 only.)
showCheckoutForReservation
This flag is
true
if this is a FileNet P8 repository and a checkout icon should be shown for
it because it has a reservation.
step_name
The work items step name property. (FileNet P8 only.)
step_tag
The work items step tag property. (FileNet P8 only.)
useApplicationBaseUrl
Set this flag to
true
or can it be set to true
with a URL parameter of same
name and it will over ride the base Url registered in Process Config Console for the application and start
the step processors from localhost.
workClass
An instance of ecm.model.ContentClass for pseudo class of the work item. (FileNet P8 only.)
workclass_name
The work items work class name property. (FileNet P8 only.)
workflowVersion
The workflow version property. (FileNet P8 only.)
Method Detail
canReassign(callback)
Return true if the work item can be reassigned. (FileNet P8 only.)
- Parameters:
- callback
- A function that is called to return a flag indicating whether the item can be reassigned or not.
- Since:
- 2.0.2
clone()
completeStep(attributes, dispatch, callback, synchronous, onError, backgroundRequest)
Complete a work item step. Will save all parameter values and can dispatch the step onto the next route in
the Process Engine.
- Parameters:
- attributes
- An array of {Object} objects containing the attribute values, keyed by attribute identifier.
- dispatch
- A boolean flag indicating whether to dispatch the item in the process engine. True when completing a step, false when just saving the step data.
- callback
- A function that is called when the processing the work item has completed. It is passed this ecm.model.WorkItem object.
- synchronous
- If true, the request is processed synchronously. (since 2.0.2)
- onError
- A function invoked when the request fails. (since 2.0.2)
- backgroundRequest
- If true, this request will run in the background without any status dialogs or wait cursor indications. (since 2.0.2)
{String} createAttachmentId(item)
Create the attachment Id string in a format that the FileNet P8 Process Engine can recognize.
- Parameters:
- item
- A ContentItem object representing the attachment object.
- Returns:
- {String} holding the new tokenized attachment id.
{String} createSubject(item)
Create a default
F_Subject
string in to be used when launching a work item.
- Parameters:
- item
- A
ContentItem
object representing the attachment object.
- Returns:
- {String} holding new subject text.
deleteTracker(lock, callback)
Delete a Tracker item from the queue. The function actually dispatchs the work item effectively removing it
from the queue.
- Parameters:
- lock
- A boolean flag indicating whether the item should be locked before deleting.
- callback
- A function that is called when the tracker item has been removed.
editWorkflow(items, callback)
Edit a Content Manager document routing workflow.
- Parameters:
- items
- A collection of ContentItem objects in a running workflow to be edited.
- callback
- A function that is called when the edit action has completed.
{ecm.model.ContentClass} getContentClass()
Returns an instance of ecm.model.ContentClass for the pseudo content class associated with this work
item. Holds a hard coded set of standard system properties for the work item.
- Returns:
- {ecm.model.ContentClass}
{ecm.model.ContentItem} getContentItem()
Returns an instance of a ecm.model.ContentItem created from the JSON for this work item. Can be used
for Content Manager work items in order to invoke authoring actions on these items.
- Returns:
- {ecm.model.ContentItem}
{ecm.model.ContentClass} getWorkClass()
Returns an instance of ecm.model.ContentClass for the pseudo class associated with this work items
list of custom parameters. This item is constructed only after retrieving the step or launch parameters.
- Returns:
- {ecm.model.ContentClass}
{Boolean} hasContent()
Returns true if this item has content.
- Returns:
- {Boolean} true if this item has content, false otherwise.
hasDependentAttributes()
Returns true if any attribute in the class is marked as having dependent attributes. If the attribute
definitions have not been retrieve then this will return false.
isAttributeHidden(attributeId)
Returns true if the specified attribute is hidden.
- Parameters:
- attributeId
{Boolean} isDeclaredAsRecord()
Returns true if this item has been declared as a record.
- Returns:
- {Boolean} true if item has been declared as a record, false otherwise.
{Boolean} isInTrackerQueue()
Returns true if the process queue this item is running in is a Tracker queue.
- Since:
- 2.0.2
- Returns:
- {Boolean} true if work item is in tracker queue.
{Boolean} isSystemItem()
Returns true if the item is a system object.
- Returns:
- {Boolean} true if this item is a system object, false otherwise.
isWorkflowRunning(item, callback)
Checks to see if the specified workflow is currently running in the Process Engine.
- Parameters:
- item
- ContentItem object for the object participating in the workflow.
- callback
- A function that is called when the action has completed. It is passed a boolean flag indicating whether the workflow is running or not.
isWorkItem()
Returns true if this item is a workitem.
launchWorkflow(item, callback)
Launches a FileNet P8 workflow programmatically (no UI).
Will also set up the initiating attachment information from the content item that is passed in (however, not required).
- Parameters:
- item
- ecm.model.ContentItem object for the object to be associated as the initiating attachment
- callback
- A function that is called when the launch action has completed.
moveToInbox(callback, items, synchronous, onError, backgroundRequest)
Move this work item into my personal in-basket.
- Parameters:
- callback
- A function that is called when the work item item has been moved.
- items
- Optional. A collection of ecm.model.WorkItem objects to move to your personal in-basket. If not set, will move the current work item (this). (since 2.0.2)
- synchronous
- If true, the request is processed synchronously. (since 2.0.2)
- onError
- A function invoked when the request fails. (since 2.0.2)
- backgroundRequest
- If true, this request will run in the background without any status dialogs or wait cursor indications. (since 2.0.2)
onChange(item)
This event is called for any change to the work item. This includes events that retrieve additional attribute
information or that update attribute information about the item.
- Parameters:
- item
openFolderContent(callback, orderBy, descending)
Retrieves folder contents for Content Manager Worklist folders.
- Parameters:
- callback
- A function that is called when the action has completed. It is passed a ecm.model.ResultSet object.
- orderBy
- The attribute identifier for the attribute to order the items.
- descending
- If true, the items are ordered in descending order.
reassign(user, displayName, delegate, callback, items, synchronous, onError, backgroundRequest)
Reassign this work item to the specified user.
- Parameters:
- user
- String holding specified user name to reassign the item too.
- displayName
- String holding the display name.
- delegate
- Boolean flag indicating whether the reassigned item should be delegated back to reassignee before moving on to next route.
- callback
- A function that is called when the work item item has been returned.
- items
- Optional. A collection of ecm.model.WorkItem objects to reassign. If not set, will reassign the current work item (this). (since 2.0.2)
- synchronous
- If true, the request is processed synchronously. (since 2.0.2)
- onError
- A function invoked when the request fails. (since 2.0.2)
- backgroundRequest
- If true, this request will run in the background without any status dialogs or wait cursor indications. (since 2.0.2)
responseStep(attributes, dispatch, callback, synchronous, onError, backgroundRequest)
Complete a work item step with a specific response. Will save all parameter values and can dispatch the step onto the next route in
the Process Engine.
- Parameters:
- attributes
- An array of {Object} objects containing the attribute values, keyed by attribute identifier.
- dispatch
- A boolean flag indicating whether to dispatch the item in the process engine. True when completing a step, false when just saving the step data.
- callback
- A function that is called when the processing the work item has completed. It is passed this ecm.model.WorkItem object.
- synchronous
- If true, the request is processed synchronously.
- onError
- A function invoked when the request fails.
- backgroundRequest
- If true, this request will run in the background without any status dialogs or wait cursor indications.
retrieveAttachments(callback)
Retrieves all attachments for a Step work item. These are the work item parameters that are of type
attachment and not the actual attachment items themselves.
- Parameters:
- callback
- A function that is called when the attachment retrieval has completed. It is passed a ecm.model.ResultSet object.
retrieveAttributes(callback)
Retrieves all attributes for the work item. Will only return a hard coded set of system attributes.
- Parameters:
- callback
- A function that is called when the attribute refresh has completed.
retrieveDependentParameters(attributes, callback, onError)
Retrieves attribute information similar to
ContentClass
but updated or restricted according to
a list of attribute values. This method is used to provide dependent behavior between parameters when
specifying their values in the step or launch processors.
- Parameters:
- attributes
- An array of {Object} objects containing the attribute values, keyed by attribute identifier.
- callback
- A function invoked when the attribute information has been retrieved. It is passed an array of ecm.model.AttributeDefinition objects for those properties that have potentially changed properties due to the attribute values passed in.
- onError
- A callback function called if there is an error returned from the request.
retrieveLaunchParameters(callback)
Retrieves all parameters for a launched work item. Depending on how the item was originally created, it may
only contain a subset of the parameters. This function will retrieve any additional missing parameters.
- Parameters:
- callback
- A function that is called when the parameter retrieval has completed. It is passed this ecm.model.WorkItem object.
retrieveMilestones(callback, milestoneLevel)
Retrieves milestone information for a work item.
- Parameters:
- callback
- A function that is called when the milestone retrieval has completed.
- milestoneLevel
- Optional {String} value holding the requested milestone level. Will default to "99" if not specified. Range is "1" to "99" inclusive.
retrieveProcessorInformation(type, callback, objectId, objectStoreName, synchronous, onError, backgroundRequest)
Retrieves the step or launch processor information for the specified work item. The step processor
information includes the information necessary to construct a URL to the step processor page.
- Parameters:
- type
- A string indicating the type of processor "step" or "launch"
- callback
- A function that is called when the parameter retrieval has completed. It is passed this ecm.model.WorkItem object.
- objectId
- Optional string holding the object Id of the workflow definition to launch. If not specified, will use the id of this work item.
- objectStoreName
- Optional string holding the object store name of the workflow definition to launch. If not specified, will use the object store name from this work items repository.
- synchronous
- If true, the request is processed synchronously. (since 2.0.2)
- onError
- A function invoked when the request fails. (since 2.0.2)
- backgroundRequest
- If true, this request will run in the background without any status dialogs or wait cursor indications. (since 2.0.2)
retrieveStepParameters(callback, lockItem)
Retrieves all parameters for a Step work item. Depending on how the item was originally created, it may only
contain a subset of the parameters. This function will retrieve any additional missing parameters.
- Parameters:
- callback
- A function that is called when the parameter retrieval has completed. It is passed this ecm.model.WorkItem object.
- lockItem
- A boolean value indicating whether to retrieve a read only version of the step element item. If set to "false", will not check the locked status and will return the item if another user has it locked. This parameter is optional, will default to "true" (will lock the item) if not set.
retrieveSubscriptions(callback, isBackgroundRequest, onError)
Retrieves all workflow subscriptions that are associated to the object specified. This information comes from
the Content Engine. This WorkItem must be constructed with the id and object store name of the Content Engine
item.
- Parameters:
- callback
- A function that is called when the workflow subscription retrieval has completed.
- isBackgroundRequest
- A boolean flag indicating that this add request should be placed in a background process. (since 2.0.2)
- onError
- A callback function called if there is an error returned when retrieving the subscriptions. (since 2.0.2)
retrieveTrackerHistory(callback)
Retrieves history information for a Tracker item.
- Parameters:
- callback
- A function that is called when the history retrieval has completed.
retrieveTrackerMilestones(callback, milestoneLevel, lockItem)
Retrieves milestone information for a Tracker item.
- Parameters:
- callback
- A function that is called when the milestone retrieval has completed.
- milestoneLevel
- Optional {String} value holding the requested milestone level. Will default to "99" if not specified. Range is "1" to "99" inclusive.
- lockItem
- A boolean value indicating whether to retrieve a read only version of the step element item. If set to "false", will not check the locked status and will return the item if another user has it locked. This parameter is optional, will default to "true" (will lock the item) if not set. (since 2.0.2)
retrieveTrackerParameters(callback)
Retrieves parameters for a Tracker item.
- Parameters:
- callback
- A function that is called when the parameter retrieval has completed. It is passed this ecm.model.WorkItem object.
retrieveTransferedWorkflows(callback, item, filterClassNames)
Retrieves all transferred workflows for the specified repository.
- Parameters:
- callback
- A function that is called when the transferred workflows retrieval has completed.
- item
- A ecm.model.ContentItem object holding workflow definition. (since 2.0.2)
- filterClassNames
- A String array of work class names. (since 2.0.2)
returnToSender(callback, synchronous, onError, backgroundRequest)
Return this work item to the previous sender.
- Parameters:
- callback
- A function that is called when the work item item has been returned.
- synchronous
- If true, the request is processed synchronously. (since 2.0.2)
- onError
- A function invoked when the request fails. (since 2.0.2)
- backgroundRequest
- If true, this request will run in the background without any status dialogs or wait cursor indications. (since 2.0.2)
setAttachmentId(id)
Sets the attachment id system parameter value.
- Parameters:
- id
- String holding the attachment id value to be set.
setSubject(id)
Sets the subject system parameter value.
- Parameters:
- id
- String holding the subject value to be set.
startWorkflow(items, callback)
Launches a Content Manager document routing workflow programmatically (no UI). Supports passing multiple
items.
- Parameters:
- items
- A collection of ContentItem objects to be started on a workflow.
- callback
- A function that is called when the start action has completed.
transferWorkflow(callback, item, workClassName)
Transfers a workflow definition into the process engine server (ready for execution).
- Parameters:
- callback
- A function that is called when the transfer workflow action has completed.
- item
- A ecm.model.ContentItem object holding workflow definition.
- workClassName
- A string holding the workflow class name to use when transferring the workflow definition
- Since:
- 2.0.2
unlockStep(abort, callback, synchronous, onError, backgroundRequest)
Unlocks a work item step.
- Parameters:
- abort
- A boolean flag indicating whether to abort (unlock) the item in the Process Engine.
- callback
- A function that is called when the processing the work item has completed. It is passed this ecm.model.WorkItem object.
- synchronous
- If true, the request is processed synchronously. (since 2.0.2)
- onError
- A function invoked when the request fails. (since 2.0.2)
- backgroundRequest
- If true, this request will run in the background without any status dialogs or wait cursor indications. (since 2.0.2)