Enterprise Administration > Business Administrative Change Promotion > Running the Business Administrative Change Promotion Command-Line Utility > Example: Exporting and Importing Business Administrative Changes Commands
  
Example: Exporting and Importing Business Administrative Changes Commands
The following example commands follow the example use case presented in Example: Exporting and Importing Business Administrative Changes. The commands provided here are used to promote changes from the developer system to the integration system and then from the integration system to the pre-production system. All commands are run within a Windchill shell. The user name and password are not provided in the commands, so a pop-up window appears when the commands are run for the user to enter their user name and password.
Registering the Integration System
The following steps are used to register the integration system:
1. Run the following command on the integration system to acquire the GUID:
windchill wt.scm.client.SCMCMD displayRepository
The GUID, host name, and other system details display on the command prompt window.
2. Copy the GUID and system host name of the integration system for use on the development system. In this example, the host name is integ.ptcnet.ptc.com and the GUID is 12345-6789-0.
3. Run the following command on the development system to register the integration system as a target system:
windchill wt.scm.client.SCMCMD manageRepository -a -n "Integration" -g "12345-6789-0" -d "integ.ptcnet.ptc.com" -t "SELECTIVEMODE"
Registering the Pre-Production System
The following steps are used to register the pre-production system:
1. Run the following command on the pre-production system to acquire the GUID:
windchill wt.scm.client.SCMCMD displayRepository
The GUID, host name, and other system details display on the command prompt window.
2. Copy the GUID and system host name of the pre-production system for use on the integration system. In this example, the host name is preprod.ptcnet.ptc.com and the GUID is 98765-4321-0.
3. Run the following command on the integration system to register the pre-production system as a target system:
windchill wt.scm.client.SCMCMD manageRepository -a -n "PreProduction" -g "98765-4321-0" -d "preprod.ptcnet.ptc.com" -t "SYNCHRONIZED"
Establishing a Baseline on the Integration System
The following command is used to create a baseline, or time from which changes are tracked, on the integration system. This step is required on the integration system because the pre-production system was registered as a synchronized target system. This step must occur before any changes are made to the integration system.
windchill wt.scm.client.SCMCMD createBaseline
Implementing Changes on Development System
Changes are made to administrative objects on the development system. The date and time the changes begin are recorded as this information is required when exporting changes. Move to the next step once all changes are made and tested.
Previewing Changes
The following command is used to preview the changes made on the development system:
windchill wt.scm.client.SCMCMD export -v -b "01/01/2015 12:00:00" -e "01/31/2015 23:59:59" -o "D:/Preview"
Review the preview file to ensure that all expected changes are displayed.
Exporting Changes from the Development System
The following command is used to export changes made on the development system:
windchill wt.scm.client.SCMCMD export -t "Integration" -s "All" -n "IntgPkg1" -d "First export of administrative data to Integration system." -b "01/01/2015 12:00:00" -e "01/31/2015 23:59:59" -o "D:/ExportedData"
Copy the resulting ZIP file to the integration system so it can be imported.
Importing Changes to the Integration System
The following command is used to import the changes made on the development system to the integration system.
windchill wt.scm.client.SCMCMD import -f "D:/ImportedFiles/ExportedChanges_Integration_123.zip" -s -o "D:/ImportLogFiles"
Since this is the first import from the development system, the -saveResolutions option was used. Any conflicts that occur during the import process appear in the Event Management utility and can be resolved there. The resolutions provided are saved and can be reused on a future import from the development system.
Test Changes on the Integration System
The imported changes to the administrative objects are tested on the integration system. Once all changes have been verified, the changes can be exported to the pre-production system.
Exporting Changes from the Integration System
The following command is used to export changes made on the integration system since the system baseline. In this case, the only changes are those that were imported from the development system.
windchill wt.scm.client.SCMCMD export -t "PreProduction" -s "All" -n "PreProdPkg1" -d "First export of administrative data to PreProduction system." -o "D:/ExportedData"
Copy the resulting ZIP file to the pre-production system so it can be imported.
Importing Changes to the Pre-Production System
The following command is used to import the changes made on the integration system to the pre-production system. The default resolutions are used since the two systems are identical and few conflicts are expected.
windchill wt.scm.client.SCMCMD import -f "D:/ImportedFiles/ExportedChanges_PreProduction_123.zip" -d -o "D:/ImportLogFiles"