Running the CLI action copyPFUComponents

This section examines in detail the CLI action copyPFUComponents in terms of the supported Ant targets (defined in exportImport_PfuComponents_build.xml, the build file) and parameters (used in exportImport_PfuComponents_data.xml, the data file). These files are available as part of the TIBCO ActiveMatrix 3.4.0 installation under TIBCO_HOME/administrator/<version>/samples.

exportImport_PfuComponents_build.xml - the build script

exportImport_PfuComponents_build.xml is a typical Ant build file and it contains two Ant targets, namely copy.components and copy.components.dryRun (which is also the default Ant target). The user is expected to use this script as-is; editing it is not required or expected. The next table describes the Ant targets in detail.

Ant Target Description
copy.components

Performs the Administrative backend operation copyPFUComponents by:

  1. Exporting all the PFU Components from Source Node
  2. Enabling features, if necessary, in order to run the copied PFU Components
  3. Importing all the previously exported PFU Components into the Target Node
copy.components.dryrun This is a default Ant target of this build script. It performs the same steps as copy.components target, but no changes will be made to the setup:
  1. PFU Components are exported from the Source Node and imported into the Target Node, but they are not persisted in the file system
  2. No features are enabled on the Target Node. However, a list of features (that are required for the PFU Components to run) are printed as the output of the dry run along with their corresponding versions

exportImport_PfuComponents_data.xml - the data file

exportImport_PfuComponents_data.xml is a TIBCO ActiveMatrix Administrator CLI Data file which serves as the input to above build file ( exportImport_PfuComponents_build.xml) . Before running the CLI action copyPFUComponents, the user must edit this file to specify the three main inputs as explained in the previous section. The next table describes the input parameters in detail.

Element/Attribute name Expected Value
SourceNode/Name

The BPM Node from which the PFU Components should be copied for Applications.

TIBCO ActiveMatrix Administrator scans all the Applications for PFU Components, which are exported from Source Node.

At the start of the export operation, the Source Node is shut down, and at the end of the import operation, the Source Node is restarted.

TargetNode/Name

The BPM Node into which the exported PFU components should be imported.

If needed TIBCO ActiveMatrix Administrator also enables features that are required for the new PFU Components to run.

While features are being provisioned to the BPM Node, the Target Node is running; once the features are provisioned, the Target Node is shut down during the actual import operation.

Once the import operation is completed, the Target Node is restarted.

Environment/Name

The name of TIBCO ActiveMatrix Environment that both Source and Target Nodes belongs to. Both nodes must belong to same Environment

Once the data file is updated and the remote.properties has the correct user information, the build script can be run from CONFIG_HOME/admin/<enterpriseName>/samples.

Note: Make sure Apache Ant (version 1.8.2+) is in the PATH. The Ant executable can be found under TIBCO_HOME/amx/<version>/bin.

Run the script as follows:

CONFIG_HOME/admin/<enterpriseName>/samples>ant -f exportImport_PfuComponents_build.xml

Above command will run the copyPFUComponents action in dry run (dryRun) mode. It is recommended that this step be executed before performing the actual copyPFUComponents action in the setup.

To run actual copyPFUComponents action, the build script can be re-run from CONFIG_HOME/admin/<enterpriseName>/samples with the copy.components target, as follows:

CONFIG_HOME/admin/<enterpriseName>/samples> ant -f exportImport_PfuComponents_build.xml copy.components

Above command will run the copyPFUComponents action on the setup and persist all changes. For more details, see Example Scenario for copyPFUComponents.