As part of the development, test, and deployment process, PCS customers often need to move PCS applications from one environment to another. Currently (as of version 17.2.3) this is a manual process. Customers have to export applications from a source PCS environment, make necessary changes in connectors and then import the applications to a target environment. There are no PCS APIs available for exporting and importing. So these two steps have to be done manually. It can be tedious work when there is a number of PCS applications to move. But it is less error-prone than the middle step where you have to modify a large number of connector configurations. A typical example of such configuration changes is modifying URL end points of external web service and REST service providers.
This post presents a simple utility program that automates the process of modifying connector configurations.
The default property file name is pcs-util.properties. This property file specifies the following properties:
SourceDirectory=./pcs-apps : a source directory that contains all PCS applications (.exp files) exported from a source environment
TempDirectory=./pcs-apps/temp : a temporary directory that contains unzipped PCS applications
DestinationDirectory=./pcs-apps/output : an output directory that contains a change log file and modified PCS applications
NewUrlLocationsFileName=./pcs-apps/newlocations.properties : a property file that specifies new property values we want to change to
A sample newlocations.properties file contains the following properties:
Specifies a new location attribute value for SimpleRestServiceConnector in the TestWebformApp PCS application.
Specifies a new connection and read timeout value for SimpleRestServiceConnector in the TestWebformApp PCS application.
Notice the property name composition is appName.connectorName.attributeName.
In version 17.2.3, the REST Connector default connection and read timeout values are set to 5 seconds. This property is not yet exposed in the PCS user interface for modification. To change this timeout value, we have to manually add the following two lines to the composite.xml file.
<binding.rest config="WADLs/SimpleRestServiceConnector.wadl" location="http://localhost:8001/simplerestweb/resources">
<property many="false" name="http.readTimeout">16000</property>
<property many="false" name="http.connTimeout">16000</property>
Set JAVA_HOME in run.cmd and simply type run.cmd in a Windows command window.
They have tested against PCS version 17.2.3.