Class icm.model.Case
Extends
ecm.model.Item.
Represents a Case.
Defined in: <icm/model/Case.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
icm.model.Case(properties)
Constructs a Case object.
|
Field Summary
Field Attributes | Field Name and Description |
---|---|
Holds AttributeDefinition objects corresponding to the current attributes
loaded into the attributes property.
|
|
The ContentItem for the Case folder in the Case Manager repository.
|
|
The case identifier for this Case object.
|
|
The case title for this Case object.
|
|
The icm.model.CaseType object for this Case object.
|
|
The ContentItem for the proxy case folder in the CM8 repository.
|
|
Will be non-null if integrating with an external data service
|
|
Holds the original values of the attributes corresponding to the current
attributes loaded into the attributes property.
|
|
The array of icm.model.Task objects associated with this Case.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
addCaseComment(commentContext, commentText, callback, errCallback, backgroundRequest)
Adds a comment to this Case.
|
|
addDocumentComment(commentContext, commentText, itemId, documentTitle, callback, errCallback, backgroundRequest)
Adds a comment to a document associated with this Case.
|
|
addTaskComment(commentContext, commentText, itemId, callback, errCallback, backgroundRequest)
Adds a comment to a Task associated with this Case.
|
|
addWorkItemComment(commentContext, commentText, workItem, callback, errCallback, backgroundRequest)
Adds a comment to a work item associated with this Case.
|
|
createDynamicTask(name, valid, flowData, callback, errCallback, backgroundRequest)
Creates a dynamic task.
|
|
Obtains an Editable object in order to make scratchpad changes to the case and possibly save
those changes.
|
|
createNewSplitCaseEditable(caseType, callback, errCallback, backgroundRequest)
Initiates a split case operation and returns a CaseEditable object for filling in the split case before saving it.
|
|
createNewTaskEditable(taskType, callback, errCallback, backgroundRequest)
Initializes an Editable object that represents a new task that is not yet persisted to the repository.
|
|
<static> |
icm.model.Case.fromContentItem(contentItem, resolutionCallback)
A factory method that obtains a Case object corresponding to a ContentItem object.
|
Returns the ecm.model.ContentItem object corresponding to the case folder.
|
|
Returns the case last modified date.
|
|
Returns the tasks for this case, grouped by taskGrouping.
|
|
Called when the entire state of the object is refreshed, primarily
when the attributes have been updated based on updated information
from the server.
|
|
relateCase(targetCase, operationDescription, relationshipCategory, twoWayRelationship, callback, errCallback, backgroundRequest)
Relates this Case to another Case.
|
|
retrieveAttributes(callback, errCallback, backgroundRequest)
Retrieves all attributes for this Case object.
|
|
retrieveCachedAttributes(callback, errCallback, backgroundRequest)
Ensures that the full set of attributes has been retrieved.
|
|
retrieveCaseComments(callback, errCallback, backgroundRequest)
Retrieves the comments associated with this Case.
|
|
retrieveCaseFolder(callback, errCallback, backgroundRequest)
Retrieves the case folder if it has not already been retrieved.
|
|
retrieveDocumentComments(itemId, callback, errCallback, backgroundRequest)
Retrieves the comments associated with a document that is associated with this Case.
|
|
retrievePage(pageType, role, callback, errCallback, backgroundRequest)
Retrieves the page appropriate for a particular type and optional role.
|
|
retrieveRelatedCases(relationshipType, relationshipCategory, callback, errCallback, backgroundRequest)
Retrieves the cases that are related to this case
|
|
retrieveTaskComments(itemId, callback, errCallback, backgroundRequest)
Retrieves the comments associated with a Task that is associated with this Case.
|
|
retrieveTasks(callback, errCallback, backgroundRequest, retrieveProperties)
Retrieves the tasks for this case.
|
|
retrieveWorkItemComments(itemId, workflowNumber, callback, errCallback, backgroundRequest)
Retrieves the comments associated with a work item that is associated with this
Case.
|
|
searchHistory(batchSize, objectTypes, eventTypes, additionalProperties, additionalFilter, callback, errback, backgroundRequest)
Executes a query for case history events.
|
|
searchTasks(taskTypes, properties, propertyFilter, resultsDisplay, includeHidden, callback, errCallback, backgroundRequest)
Runs a search query for task instances.
|
|
unrelateCase(relationshipId, operationDescription, callback, errCallback, backgroundRequest)
Unrelates this Case from another Case that was previously related.
|
Constructor Detail
icm.model.Case(properties)
- Parameters:
- properties
- The properties for the Case 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
caseFolder
This variable will be null if the case folder object has not yet been retrieved. Call retrieveCaseFolder() to ensure this object has been retrieved.
caseIdentifier
caseTitle
caseType
cm8CaseFolder
This variable will be null if the case folder object has not yet been retrieved. Call retrieveCaseFolder() to ensure this object has been retrieved.
externalDataIdentifier
originalAttributes
tasks
Method Detail
addCaseComment(commentContext, commentText, callback, errCallback, backgroundRequest)
- Parameters:
- commentContext
- A number that indicates the action, such as adding a document or case, that was being taken when this comment was created. This value is based on the choice list that is defined in the CmAcmActionChoiceList object in the target object store.
- commentText
- A string that contains the text for the comment
- callback
- a function called with icm.model.CaseComment.
- 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.
addDocumentComment(commentContext, commentText, itemId, documentTitle, callback, errCallback, backgroundRequest)
- Parameters:
- commentContext
- A number that indicates the action, such as adding a document or case, that was being taken when this comment was created. This value is based on the choice list that is defined in the CmAcmActionChoiceList object in the target object store.
- commentText
- A string that contains the text for the comment
- itemId
- The identifier that indicates the specific document for which the comment is to be added. Specify the version series ID.
- documentTitle
- The title that is assigned to the document in Content Platform Engine
- callback
- a function called with icm.model.CaseComment.
- 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.
addTaskComment(commentContext, commentText, itemId, callback, errCallback, backgroundRequest)
- Parameters:
- commentContext
- A number that indicates the action, such as adding a document or case, that was being taken when this comment was created. This value is based on the choice list that is defined in the CmAcmActionChoiceList object in the target object store.
- commentText
- A string that contains the text for the comment
- itemId
- The identifier that indicates the specific task for which the comment is to be added. Specify the GUID for the task
- callback
- a function called with icm.model.CaseComment.
- 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.
addWorkItemComment(commentContext, commentText, workItem, callback, errCallback, backgroundRequest)
- Parameters:
- commentContext
- A number that indicates the action, such as adding a document or case, that was being taken when this comment was created. This value is based on the choice list that is defined in the CmAcmActionChoiceList object in the target object store.
- commentText
- A string that contains the text for the comment
- workItem
- the icm.model.workItem object for which the comment is to be added.
- callback
- a function called with icm.model.CaseComment.
- 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.
createDynamicTask(name, valid, flowData, callback, errCallback, backgroundRequest)
- 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.
createEditable()
Typically the full set of attributes should be retrieved before obtaining a CaseEditable although a CaseEditable can be obtained up front. When the full set of attributes are eventually retrieved (using retrieveAttributes() or retrieveCachedAttributes()) the CaseEditable will be refreshed to reflect the full set of attributes.
- Returns:
- icm.model.CaseEditable
createNewSplitCaseEditable(caseType, callback, errCallback, backgroundRequest)
- Parameters:
- caseType
- the case type of the new split case. This is either the case type symbolic name or the CaseType object.
- callback
- the function called with icm.model.CaseEditable.
- 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.
createNewTaskEditable(taskType, callback, errCallback, backgroundRequest)
Currently only discretionary tasks can be created by a user.
- Parameters:
- taskType
- a task type name or TaskType object. It must represent a discretionary task type.
- callback
- a function called with icm.model.TaskEditable
- 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.Case.fromContentItem(contentItem, resolutionCallback)
- Parameters:
- contentItem
- An ecm.model.ContentItem object that represents the case folder in the FileNet P8 repository. Use the IBM Content Navigator API to retrieve the ContentItem object by running a query or navigating the folder hierarchy.
- resolutionCallback
- In constructing the Case object, it may be necessary to resolve certain attributes. Currently this is the CaseType of the Case. It may be necessary to perform the resolution asynchronously, for example, if the Case object is in a different solution than the solution the user is currently working with and case types have not yet been retrieved. Provide a callback function for this argument and it will be called when any resolution is complete. If no asynchronous resolution is necessary, the callback will be called right away. The callback function is called with the same Case object that this factory method returns.
- Returns:
- icm.model.Case
getCaseFolder()
- Returns:
- ecm.model.ContentItem
getDateLastModified()
- Returns:
- (Date) the case last modified date
getGroupedTasks()
- Returns:
- an object representing the grouped tasks
onRefresh()
relateCase(targetCase, operationDescription, relationshipCategory, twoWayRelationship, callback, errCallback, backgroundRequest)
- Parameters:
- targetCase
- the icm.model.Case to relate to.
- operationDescription
- (optional) a textual description of the relate operation. This description is captured in the relationship objects that relate the source case to the target case, and can be viewed by a user later.
- relationshipCategory
- (optional) a textual name for the type of relationship. A category name provides additional information to identify the nature of the relationship and facilitates searches for certain types of relationships. This category name is captured in the relationship objects that relate the source case to the target case, and can be viewed by a user later.
- twoWayRelationship
- (optional) a boolean indicating if the established relationship is a reflexive relationship (that is, if the target case will also be related to this case)
- callback
- a function called with a string representing the relationshipId.
- 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)
- Parameters:
- callback
- a function called with an icm.model.Case object
- 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)
- Parameters:
- callback
- a function called with an icm.model.Case object
- 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.
retrieveCaseComments(callback, errCallback, backgroundRequest)
- Parameters:
- callback
- a function called with icm.model.CaseComment.
- 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.
retrieveCaseFolder(callback, errCallback, backgroundRequest)
- Parameters:
- callback
- a function called with an ecm.model.ContentItem object
- 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.
retrieveDocumentComments(itemId, callback, errCallback, backgroundRequest)
- Parameters:
- itemId
- The identifier that indicates the specific document for which comments are to be returned. Specify the version series ID.
- callback
- a function called with icm.model.CaseComment.
- 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.
retrievePage(pageType, role, callback, errCallback, backgroundRequest)
- Parameters:
- pageType
- the page type. Valid types are CasePage, CaseCreationPage, CaseSplitPage, and DynamicTaskStepPage
- role
- the role name or ecm.model.ProcessRole object
- callback
- a function called when retrieval is complete. See icm.model.Solution.retrieveStaticPages for the page information returned.
- 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.
retrieveRelatedCases(relationshipType, relationshipCategory, callback, errCallback, backgroundRequest)
- Parameters:
- relationshipType
- the relationship type that limits the relationships and related cases that are returned. If this parameter is null, all relationships and related cases are returned..
- relationshipCategory
- the relationship category name that limits the relationships and related cases that are returned. If this parameter is null, all relationships and related cases of the specified relationship type are returned.
- callback
- a function called with the response object.
- 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.
retrieveTaskComments(itemId, callback, errCallback, backgroundRequest)
- Parameters:
- itemId
- The identifier that indicates the specific task for which comments are to be returned. Specify the GUID for the task.
- callback
- a function called with icm.model.CaseComment.
- 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.
retrieveTasks(callback, errCallback, backgroundRequest, retrieveProperties)
- Parameters:
- callback
- a function called with an array of icm.model.Task objects
- 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.
- retrieveProperties
- An optional argument. If true, retrieve properties for each of the task object returned. Default value is false if not passed in.
retrieveWorkItemComments(itemId, workflowNumber, callback, errCallback, backgroundRequest)
- Parameters:
- itemId
- The identifier that indicates the specific work item for which comments are to be returned. Specify the GUID for the task.
- workflowNumber
- The workflow number that indicates the specific work item for which comments are to be returned.
- callback
- a function called with icm.model.CaseComment.
- 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.
searchHistory(batchSize, objectTypes, eventTypes, additionalProperties, additionalFilter, callback, errback, backgroundRequest)
- Parameters:
- batchSize
- The maximum number of entries to return from any request. If more entries exist, retrieveNextPage() can be called on the ResultSet object produced by this method.
- objectTypes
- An array of the object types for which entries are to be returned.
The different object types that can be returned are:
- "CmAcmCaseComment"
- "CmAcmCaseFolder"
- "CmAcmCaseSubfolder"
- "CmAcmCaseTask"
- "Document"
- "CmAcmTaskComment"
- "CmAcmVersionSeriesComment"
- "CmAcmWorkItemComment"
- eventTypes
- An array of the type of events for which entries are to be returned.
The different event types are:
- "CancelCheckoutEvent"
- "CmAcmCaseFileEvent"
- "CmAcmCaseRelatedEvent"
- "CmAcmCaseUnfileEvent"
- "ChangeClassEvent"
- "ChangeStateEvent"
- "CheckinEvent"
- "CheckoutEvent"
- "ClassifyCompleteEvent"
- "CreationEvent"
- "DeletionEvent"
- "DemoteVersionEvent"
- "FileEvent"
- "FreezeEvent"
- "LockEvent"
- "CmMoveContentEvent"
- "PromoteVersionEvent"
- "PublishCompleteEvent"
- "PublishRequestEvent"
- "TakeFederatedOwnershipEvent"
- "UnfileEvent"
- "UnlockEvent"
- "UpdateEvent"
- "UpdateSecurityEvent"
- additionalProperties
- An array of a list of properties for custom events that have auditing configured for custom properties. The array contains the property symbolic names.
- additionalFilter
- an optional filter that can further limit what event entries are returned. You should specify a condition that is appended to the WHERE condition in the SQL statement used to query for the event objects (using the syntax AND (...)). If any invalid syntax is specified in this filter, an exception is thrown when attempting the query.
- callback
- A callback function called when the search completes. The function is passed an icm.model.ResultSet object.
- errback
- An optional callback function called if an error occurs.
- backgroundRequest
- An optional argument that is true if this is to be issued as a background request to the server.
searchTasks(taskTypes, properties, propertyFilter, resultsDisplay, includeHidden, callback, errCallback, backgroundRequest)
- Parameters:
- taskTypes
- An array that contains the symbolic names of the task types for which tasks are to be returned. If the value is null, no task types filtering is done and all tasks types are returned.
- properties
- An array that contains a list of task properties symbolic names to be included on the task object returned by the search.
- propertyFilter
- A String representing the property filter condition to apply to the search. The string needs to conform to the Content Platform Engine SQL syntax. For example ([prop1] = 1 AND [prop2] <> 3) The properties included in this filter need to be included in the properties parameter
- resultsDisplay
- An optional javascript object that defines the display attributes of the returned results. For example:
{sortBy: "DateCreated", sortAsc: false}
- includeHidden
- Pass true to include hidden tasks in the results. Otherwise hidden tasks will be filtered out.
- callback
- A callback function to be called when the search completes. An array of icm.model.Task objects is passed to the function.
- errCallback
- An optional callback function to be called if an error occurs.
- backgroundRequest
- An optional argument that is set to true if this method is to be issued as a background request to the server.
unrelateCase(relationshipId, operationDescription, callback, errCallback, backgroundRequest)
- Parameters:
- relationshipId
- the ID of the relationship to delete.
- operationDescription
- (optional) a textual description of the operation. This description is captured in the audit logs for unrelating the source case to the target case and can be viewed by a user later.
- callback
- a function called with the response object.
- 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.