DocumentService

The DocumentService is used to manage case folders, which are used to store documents associated with a case.

The table below lists the functions available from the DocumentService.

System actions required: deleteDocument, deleteOrphanedFolders, and unlinkDocument require the cmisAdmin system action. All other DocumentService functions require the cmisUser system action.

Function Description Returns
createDocument Creates a document in a case folder. CreateDocumentResponseType
deleteDocument

--or--

deleteDocumentAlt

Deletes the specified document from the CMS.

You can either pass a document reference string, or a DeleteDocumentRequestType element, to identify the document.**

Note: If a document is linked to multiple cases, and that document is deleted, it is deleted from all case folders.
DeleteDocumentResponseType
deleteOrphanedFolders Deletes orphaned case folders, that is, case folders whose case objects have been deleted.
  • The request can specify that details for the deleted folders be returned, as well as a date that specifies that folders whose case objects were deleted on or before the date be deleted.
  • The response can optionally return the paths to folders that failed to be deleted.

Orphaned case folders may be deleted automatically when case objects are deleted, depending on the setting in the deleteFolderOnUndeploymentOrCaseObjectDeletion configuration parameter. For more information, see the "Case Folders" section in the TIBCO ActiveMatrix BPM Case Data User's Guide.

DeleteOrphanedFoldersResponseType
findDocuments

--or--

findDocumentsAlt

Returns references to documents that are linked to a specified case.

You can either pass a case reference string, or a FindDocumentsRequestType element, to identify the case.

For more information about queries used with the findDocuments function, see Queries for findDocuments.

FindDocumentsResponseType
getDocumentContent

--or--

getDocumentContentAlt

Returns the content of the specified document.

You can either pass a document reference string, or a GetDocumentContentRequestType element, to identify the document.**

The response returns the document content, in base64Binary, as well as the mime type of the content.

GetDocumentContentResponseType
getDocumentMetadata

--or--

getDocumentMetadataAlt

Returns the metadata for the specified document.

You can either pass a document reference string, or a GetDocumentMetadataRequestType element, to identify the document.**

GetDocumentMetadataResponseType
getFolderContent

--or--

getFolderContentAlt

Returns the content of the specified case folder, and optionally, sub-folders.

You can either pass a case reference string, or a GetFolderContentRequestType element, to identify the case.**

GetFolderContentResponseType
getRepositoryInfo Returns information about the CMIS repository, including which "versioning states" the repository supports.

Some repositories support versioning (in which case, MAJOR and MINOR are typically allowed) and others don't support versioning (in which case, this operation returns "NONE" for "versioningStateSupported"). This information can be used by the application to offer only the valid choices when users attempt to import documents.

GetRepositoryInfoResponseType
linkDocument

--or--

linkDocumentAlt

Links a document to a specified case.

You can either pass the document reference (or document specifier) and target case reference as strings, or a LinkDocumentRequestType element, to identify the document and case.**

The response returns either a document reference or an empty response, as follows:
  • If a document specifier is passed in the request (as opposed to a document reference), a document reference is returned.
  • If a document reference is passed in the request, an empty response is returned.
Note: If a document is linked to multiple cases, and that document is deleted, it is deleted from all case folders. Not all repositories allow you to link documents to multiple cases.
LinkDocumentResponseType
moveDocument

--or--

moveDocumentAlt

Moves the specified document from one case folder to another case folder.

You can either pass the document reference and source and target case references as strings, or a MoveDocumentRequestType element, to identify the document and case.**

The response returns the document reference of the document that was moved. Note that moving the document may cause its reference to change.

MoveDocumentResponseType
unlinkDocument

--or--

unlinkDocumentAlt

Unlinks a document from a case, which removes the document from the case folder.

You can either pass the document and case references as strings, or an UnlinkDocumentRequestType element, to identify the document and case.**

UnlinkDocumentResponseType

** Some CMIS servers use characters in document and case references that need escaping when included in URLs. If this is an issue, you can URL-encode the references, or you can use the alternative function that passes an element.