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
andType
. 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
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 |