This article describes how to call Java classes in the Process Commander application libraries to programmatically export and import Process Commander class instances from and to Process Commander databases.
Note : The source Process Commander system must be V5.2 or later, and the destination Process Commander system must have the same or a later version than the source system.
The following diagram shows a conceptual view of the components involved in the process:
n this diagram, the two Process Commander systems and a third computer executing the script are distinct. In practice, however, this operation can involve one, two, or three computers, or more if each Process Commander system uses a separate computer to host its PegaRULES database. The operation always involves two prconfig.xml files, one identifying the source PegaRULES database (containing the rules to be migrated), and the second identifying the target PegaRULES database.
Note that the Export and Import calls operate directly on the Process Commander databases, independent of the Process Commander applications. The transfer can even occur when the Process Commander application and its server are not in operation; however, the database servers must be running.
To complete this process:
An example of an Apache Ant script calling these classes is provided below, but you could apply the same method to any scripting language. For example, you can create a Unix shell script to migrate a RuleSet version OurFinance:02-05-15 from a development system (labelled SOURCE in the diagram) to a unit testing system (labelled Target).
Important: This functionality does not duplicate the Product wizard. If you are moving entire Rule-Applications you should use the Import and Export Archive (formerly RulesMove) facility. When calling the Export method, you must specify exactly which RuleSets and/or classes you want to move. Before using these methods, be sure you understand RuleSets and RuleSet archives.