Get Properties for Documents and Folders

You can use an XPath expression to fetch document properties or folder properties given the name of the document or folder. You can then pass the property information to a REST service.

For example, as part of your document workflow patterns, you may have a need to copy documents to a process folder or get documents from a process folder. Suppose you have a process that manages transactional content and documents from a central IN box initiate the process. Once the process is initiated, the documents need to be moved from the central IN box to a process folder.

Or, after documents have been successfully reviewed and approved, you might want to move those documents to a final approved location. For example, think about a process that manages market assets. In this case, you might want to get the documents from a process folder and move them to an approved marketing collateral folder.

Get Document Asset Property

In the Expression Editor, you can select Get Document Asset Property from the Document Service option. You can get a property for an asset, which in this case can be a document or a folder.

Here is the usage format:

DocumentService.getDocumentAssetProperty(<propertyName>,<documentAssetName>)

You need to enter two parameters:

  • Property Name, which is of String type, defines the property that you want to get. Supported properties are Id and Type. The value returned for Id is the actual ID of the document or folder used in Oracle Content Management. The value returned for Type is INCOMING_DOCUMENT, MANAGED_FOLDER, or INCOMING_FOLDER.

  • Document Asset Name, which is the name of the document or folder.

The command returns a property value of string type.

If you don’t provide a parameter or if you provide more than two parameters, an error occurs.

Defining the Simple Expression in the Editor

To get properties and access the ID for folders or documents:
  1. In the Oracle Integration navigation pane, click Processes.
  2. Open an application.
  3. Click Processes.
  4. Open a process, and click an activity in the process.
  5. Click Menu Menu icon, and select Open Data Association.
  6. Click Expression Editor Expression Editor icon.
  7. Select the Operators tab.

    In the Expression Editor dialog box, locate the following options on the Operators tab:

    • Document Service

  8. Select the expression to insert.

    As with all simple expression functions, you click Insert into Expression to enter the parameter values and then click Validate to verify your expression.

    An empty string is returned if there are no values for the document or folder properties.

Example XPath Expression Sample Result
DocumentService.getDocumentAssetProperty("Id", "TestFolder") F14573D5EECE5BAB5724CE41T0000DEFAULT00000000
DocumentService.getDocumentAssetProperty("Type", "TestFolder") MANAGED_FOLDER
DocumentService.getDocumentAssetProperty("Id", "Incoming_Document") D214D537E68C726FB70FF6E1T0000DEFAULT00000000
DocumentService.getDocumentAssetProperty("Type", "Incoming_Document") INCOMING_DOCUMENT