Document Service Operation Application Type

The Document Service Operation application type provides the functionality for content repositories of one or more JCR-compliant DMS, such as:

Creating a Document Service Application

To create an application of Document Service Operation type:

Create a DMS Operation Application
Figure: Create a DMS Operation Application.

or:

Create a DMS Operation Application - Outline
Figure: Create a DMS Operation Application from the Outline View.

Property Page Setup

Open the property page of the document service application with a double-click on its symbol to set the specific properties like the operation to be performed or specific operation options.

DMS Operations

The property page contains an operation combo box to select the function which should be invoked. Please refer to the section Supported Operations for a list of supported operations and their usage.

Select an Operation
Figure: Select an Operation

Operation Options

Depending on the selected operation, there are some operation options provided, e.g. to specify how the target folder or how the versioning behavior is defined:

Runtime-Defined Target Folder

The checkbox Use runtime-defined target folder indicates that the created document or folder should be placed in the folder specified by the accessPoint targetFolder. This checkbox is only shown for DMS operations Add Document and Create Folder.

Use Runtime-Defined Target Folder
Figure: Option to use runtime-defined Target Folder.

Runtime-Defined Versioning

The checkbox Use runtime-defined versioning indicates, that the versioning behavior of the DMS operation is controlled by the value of the accessPoint versioning. This checkbox is only provided for DMS operations Add Document and Update Document.

Use Runtime-Defined Versioning
Figure: Option to use runtime-defined Versioning.

Supported Operations

The following tables list the operations supported by the Document Service Operation application type. Depending on the selected operation, the access points of the application will vary. The provided operations are:

The section Expression Syntax for Find Operations provides information on how to set up expressions for find operations like Find Folders or Find Documents.

Overview

Add Document

Direction Access Point Name Model Type Description
IN targetFolder Folder Specifies the parent folder of the new document. Can be specified if Use runtime-defined target folder is on.
IN versioning Versioning Specifies if immediately after document creation, a new revision should be created (versioning.createRevision). versioning.revisionName will be used as revision name. Can be specified if Runtime-defined versioning is on
INOUT document Document Document properties that are allowed to be set will be read and used for creation. After creation document is filled with the details of the new document object

Create Folder

Direction Access Point Name Model Type Description
IN targetFolder Folder Used to specify the parent folder of the new folder. Can be specified if Use runtime-defined target folder is on.
INOUT folder Folder Folder properties that are allowed to be set will be read and used for creation. After creation folder is filled with the details of the new folder object.

Get Document

Direction Access Point Name Model Type Description
IN documentId String Document ID or path
OUT document Document The document, if found for this ID

Get Documents

Direction Access Point Name Model Type Description
IN documentIds ListString List of document IDs or paths
OUT documentList DocumentList Documents, if found for these IDs

Get Folder

Direction Access Point Name Model Type Description
IN folderId String Folder ID or path
OUT folder Document The folder, if found for this id

Get Folders

Direction Access Point Name Model Type Description
IN folderIds List<String> List of folder IDs or paths
OUT folderList FolderList Folders, if found for these IDs

Find Documents

Direction Access Point Name Model Type Description
IN documentInfo Document Defines search criteria. Currently only the property name is used to pass the "name pattern" search criteria.
IN expression String Repository specific search expression, alternatively to documentInfo.
OUT documentList DocumentList Documents from the search results, if any.

Please refer to the section Expression Syntax for Find Operations for information on the expression syntax to use.

Find Folders

Direction Access Point Name Model Type Description
IN folderInfo Folder Defines search criteria. Currently only the property name is used to pass the "name pattern" search criteria.
IN expression String Repository specific search expression, alternatively to folderInfo.
OUT folderList FolderList Folder from the search results, if any

Please refer to the section Expression Syntax for Find Operations for information on the expression syntax to use.

Version Document

Direction Access Point Name Model Type Description
IN document Document Document to be versioned
IN revisionName String Revision name

Update Document

Direction Access Point Name Model Type Description
IN document Document Document containing changed metadata, etc. to be written into repository.
IN versioning Versioning Specifies if immediately after document creation, a new revision should be created (versioning.createRevision). versioning.revisionName will be used as revision name. Can be specified if Runtime-defined versioning is on.

Note that while using the Update Document operation, you need to create in data mapping of a boolean type of primitive data for its application activity.

Update Folder

Direction Access Point Name Model Type Description
IN folder Folder Folder containing changed metadata, etc. to be written into repository.

Remove Document

Direction Access Point Name Model Type Description
IN document Document Document to delete/update

Remove Folder

Direction Access Point Name Model Type Description
IN folder Folder Folder to delete

Expression Syntax for Find Operations

The following sections describe the expression query syntax for Find Documents and Find Folders operations.

Searching for documents/folders with a specific name

The expression query syntax for searching for documents or folders with a specific name looks like the following:

//*[@vfs:name='test1']

Result: returns all documents and folders having a name equal to 'test1'.

Searching for documents/folders with a specific custom attribute

The expression query syntax for searching for documents or folders with a specific custom attribute looks like the following:

/jcr:root/vfs:metaData/*[@vfs:attributes/vfs:orderNr='123']

Result: returns all documents and folders having the custom attribute 'orderNr' equal to '123'.

Searching for documents/folders with specific custom attributes combined with a wildcard search

The expression query syntax for searching for documents or folders with specific custom attributes (AND-predicate) combined with a wildcard search looks like the following:

/jcr:root/vfs:metaData/*[@vfs:attributes/vfs:orderNr='123' and jcr:like(@vfs:attributes/vfs:customerName, '%John%')]

Result: returns all documents and folders having the custom attribute 'orderNr' equal to '123' and the attribute 'customerName' containing the string 'John'.

Usage

For example use a primitive data to parse an expression syntax to search for a document with a specific name. Set the data mapping access point to expression:


Figure: Create a Primitive Data with Access Point expression.

When running the model, enter the expression syntax in the provided entry field for the primitive data, e.g.:

Enter a Search Expression.
Figure: Enter a Search Expression.

Transfer the result via data mapping with access point documentList to a Document List data. The result can then be displayed as Document List output field:

Enter a Search Expression.
Figure: Search Result as Document List.

Configuring Retry Mechanism

The configurable retry mechanism provides the facility to retry an operation in case the target service is temporarily unavailable.

For more information, please refer to Retry Mechanism of Non-interactive Applications section of the Applications Concept chapter.

If you enable the Retry functionality for a Document Management Service application, you have to define the number of retries and the time between retries in seconds. Note that the maximum number of retries is 10 and the maximum time between retries is restricted to 60 seconds. Additionally you can enable the retry to be performed on application side and thus disable a retry on engine side.


An application with an enabled retry functionality will retry for the defined number of times with a pause of the defined number of seconds, until it succeeds. If the application still fails after the defined number or time, it will no longer retry.