X

It's All About the Platform.

  • February 23, 2015

Under the Covers of The WebCenter Content Document Transfer Utility

Guest Author

In this post we take a deeper look into using the WebCenter Content Document Transfer Utility for Oracle Fusion Applications. To do this let's look a bit further into the example from a previous post on Using the Webcenter Content Document Transfer Utility.

Configuration File

In the previous post I uploaded a local file called readme.txt to a remote Webcenter Content Server deployed within Fusion Applications using the Document Transfer Utility. In my example I used the Upload and then the Search batch script to search for the document. For those scripts to work there is a configuration file that both scripts reference that contains all the parameters that we want to pass in, like the URL for the Content Server, the username and so on.

url=https://<WCC-HOST>:<WCC-PORT>/cs/idcplg
username=<USERNAME>

There are also some fields that need to be populated during
check-in. These fields are listed below and were populated in my example in the
connection.properties file.

primaryFile=c:/doc/readme.txt
dDocTitle=Test Doc Reader another revision
dSecurityGroup=CRM
dDocAccount=TestAccount2

The process of checking in a new revision of an existing content item requires additional parameters to be set such as the parameters below which were also set in the connection.properties file.

dDocName=UCMFA025242
checkout=true

Batch Files

I also edited the batch scripts to point to reference a password file for authentication purposes rather than specify the password in my batch file. I could have set the password variable
in the connection.properties instead by setting...

password=<PASSWORD>

The following line is from the Upload batch file where you can see the reference to both the propertiesFile and the passwordFile.

"%JAVACMD%" -Xms512m ^
-jar "%LIB%" ^
UploadTool ^
-propertiesFile="%~dp0\connection.properties" ^
-passwordFile="%~dp0\pwd.properties" ^
%*

The line above is the line that executes the Document Transfer Utility Java classes passing the configuration files to the oracle.ucm.fa_client_11.1.1.jar. It exists in all of the available scripts in the utility; upload, search, download and ping batch files.

The batch file passes the parameter 'UploadTool' as the first parameter to the default class in the JAR file. The default class of the JAR file is defined in the manifest.mf and is the oracle.ucm.idcws.client.JarEntryClass. The Main method reads the args[0] parameter, which in the case above is 'UploadTool', and then loads the relevant class to perform the action. The relevant class performs the required operation behind the scenes invoking the RIDC client if using that method to connect to the Webcenter Content Server as opposed to the Web Services method.

In our case this is what happened because currently when using the Document Transfer Utility to perform operations on a Fusion Applications Webcenter Content Instance in a SaaS pod, there is only one mode of connection that can be used. This is via the RIDC Client via the Web Port (https://<WCC-HOST>/cs/idcplg).

JAR file Execution

So far we have talked about using the batch scripts to run the tool. However as you may have already understood, it's possible to execute the JAR file from the command line as well. This is obviously a little trickier because all the parameters need to be passed on the command prompt as well. To upload a new revision of the content item by executing the JAR file from the command line the syntax is...

 
java -classpath "oracle.ucm.fa_client_11.1.1.jar" oracle.ucm.client.UploadTool
--url=https://<WCC-WEB-HOST>/cs/idcplg
--username=<USERNAME>
--password=<PASSWORD>
--dDocTitle="Test Doc Reader"
--primaryFile=c:/doc/readme.txt
-dDocName=UCMFA025242
-dSecurityGroup=CRM
-dDocAccount=TestAccount2
-checkout=true

It is also possible to separate out the connection details from the execution line and have the document details passed to the command prompt such as...

java -classpath "oracle.ucm.fa_client_11.1.1.jar" oracle.ucm.client.UploadTool 
--propertiesFile=connection.properties
-dDocTitle="Test Doc Reader"
--primaryFile=c:/doc/readme.txt
-dSecurityGroup=CRM
-dDocAccount=TestAccount2
-dDocName=UCMFA025242
-checkout=true

The latter example is easier to use if you plan is to create your own batch script to check-in multiple content items. A batch file could be created that has one line per content item specifying all the necessary metadata for that item whilst referring to the connection.properties file for all the common variables.

A word of warning though. When using the command line to check-in multiple items it will be necessary to build some way of checking that all the content items listed in the batch file were successfully checked in. One possible way to do this is to perform a check after the batch script has completed by searching for the content items after they have been checked in.

In a future post we will look into how to use the Remote Intradoc (RIDC) Client, another Webcenter Content client tool.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.