The Document Service Operation application type provides the functionality for content repositories of one or more JCR-compliant DMS, such as:
To create an application of Document Service Operation type:
Figure: Create a DMS Operation Application.
or:
Figure: Create a DMS Operation Application from the Outline View.
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.
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.
Figure: Select an Operation
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:
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.
Figure: Option to use runtime-defined Target Folder.
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.
Figure: Option to use runtime-defined Versioning.
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.
| 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 |
| 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. |
| Direction | Access Point Name | Model Type | Description |
|---|---|---|---|
| IN | documentId | String | Document ID or path |
| OUT | document | Document | The document, if found for this ID |
| 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 |
| Direction | Access Point Name | Model Type | Description |
|---|---|---|---|
| IN | folderId | String | Folder ID or path |
| OUT | folder | Document | The folder, if found for this id |
| 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 |
| 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.
| 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.
| Direction | Access Point Name | Model Type | Description |
|---|---|---|---|
| IN | document | Document | Document to be versioned |
| IN | revisionName | String | Revision name |
| 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.
| Direction | Access Point Name | Model Type | Description |
|---|---|---|---|
| IN | folder | Folder | Folder containing changed metadata, etc. to be written into repository. |
| Direction | Access Point Name | Model Type | Description |
|---|---|---|---|
| IN | document | Document | Document to delete/update |
| Direction | Access Point Name | Model Type | Description |
|---|---|---|---|
| IN | folder | Folder | Folder to delete |
The following sections describe the expression query syntax for Find Documents and Find Folders operations.
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'.
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'.
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'.
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.:
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:
Figure: Search Result as Document List.
The configurable retry mechanism provides the facility to retry the 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 chapter.
For example, you have added an application to the model. In the Property page of the application, you can enable the retry, specify number of retries and time between retries. However, note that maximum 10 retries and 60 seconds between two retries are allowed. So, the application will retry for the defined number of times with a pause of the defined number of seconds, until it has success. If the application still fails after the defined number, it will no longer retry.
