Deploying OAF Personalizations Using the Import/Export Command Line Tools
September 28, 2011 Leave a comment
After personalizing and testing framework pages in a Development instance, you may wish to automate the transfer of these changes to another instance, rather than manually re-doing them all again. This objective can be achieved by exporting the personalizations from the Development instance, then importing them to a different instance or instances
You can either use the GUI interface in “Functional Administrator” (Personalization tab) to transfer personalizations, or can invoke the XMLImporter/XMLExporter commands directly from the command line. The Export tool allows you to export a package or xml file (along with translation information) from the MDS repository of a database instance to a .xml file (or .xlf file for translations). The command line Export tool is necessary if you wish to perform bulk translations of personalization documents.
This post provides the below detailed steps how to transfer personalizations from one instance to others using the XMLImporter/XMLExporter tool.
1. Get Document Name
Go to the page you want to copy the personalization from and click the “about this Page” link at the bottom of the page. You will see the page name with full path which starts with /oracle/apps/<prod>.
2. Get the Personalization Document info
Run the following command in TOAD or other tools as APPS user
set serveroutput on exec jdr_utils.listCustomizations('<full document name from step 1>');
set serveroutput on exec jdr_utils.listCustomizations('/oracle/apps/icx/por/wf/webui/ReqLinesNotificationsRN');
anonymous block completed
Note: If there are multiple records returned by this command, you will need to use export/import each item individually that you wish to export. You may also find there are records returned for seeded personalizations provided by Oracle which do not need to be exported.
3. Use XMLExporter to export personalization document
java oracle.jrad.tools.xml.exporter.XMLExporter <personalization document from step #2> \ -username "<username>" -password "<password>" \ -dbconnection "(description=(address_list=(address=(protocol=tcp)(host=<host>)(port=<port)))(connect_data=(sid=<sid>)))" \ -rootdir "<output directory>"
java oracle.jrad.tools.xml.exporter.XMLExporter \ /oracle/apps/icx/por/wf/webui/customizations/site/0/ReqLinesNotificationsRN -username apps -password w3lcome123 \ -dbconnection "(description=(address_list=(address=(protocol=tcp)(host=myhost)(port=12345)))(connect_data=(sid=dev)))" -rootdir "$XXSCM_TOP/install" \
Here one file named ReqLinesNotificationsRN.xml will be created in the below path:
XXSCM_TOP/install/oracle/apps/icx/por/wf/webui/customizations/site/0. Open the file and you will able to view the personalizations that you have done.
4. Use XMLImporter to import personalization document
Run the below command in the Instance where you want to import your personalization.
java oracle.jrad.tools.xml.importer.XMLImporter \ <full path of the file you want to import> \ -username "<username>" -password "<password>" \ -dbconnection "(description=(address_list=(address=(protocol=tcp)(host=<host>)(port=<port>)))(connect_data=(sid=<sid>)))" -rootdir "<top level directory>" \ -rootPackage "/oracle/apps/<prod>"
java oracle.jrad.tools.xml.importer.XMLImporter \ $XXSCM_TOP/install/ReqLinesNotificationsRN.xml \ -username apps -password w3lcome123 \ -dbconnection "(description=(address_list=(address=(protocol=tcp)(host= myhost)(port=12345)))(connect_data=(sid=dev)))" -rootdir "$XXSCM_TOP/install" \ -rootPackage "oracle/apps/icx/por/wf/server"