Saturday, 28 September 2013

20. OAF Related Migrations from one Instance to Another

Migration of fully custom OAF page

Assuming that the custom page is created and running fine from JDeveloper, we need to perform below steps for migrating the same to any instance:

1) From JDeveloper, rebuild the parent package corresponding to the page(s). This will compile all the files and will be stored at <JDEV_USER_HOME>\myclasses. For example in below screenshot, on compiling emprec package, corresponding class files get generated at <JDEV_USER_HOME>\myclasses\xxcus\oracle\apps\fnd\emprec :


2) Connect to unix server and move files from classes folder to $JAVA_TOP.
Note: <JDEV_USER_HOME>\myclasses folder on local is equivalent to $JAVA_TOP on unix box.
So all files at <JDEV_USER_HOME>\myclasses\xxcus\oracle\apps\fnd\emprec will be moved to $JAVA_TOP/xxcus/oracle/apps/fnd/emprec. If this folder structure is not present at $JAVA_TOP, we have create those manually else we can simply move .class and .xml files.
3) Once all the files are moved, final step is to import the pages. Either we can import using Command Prompt from local or we can do this on unix server as well.

Here are commands for both: Page Import Commands

For migration from one instance to another, only difference is that we need to copy files from $JAVA_TOP of one instance and then move to $JAVA_TOP of other instance.

Migration of Personalization

1) Firstly do the personalization (like create item, change prompt, attach custom CO.. etc) on the page using 'Personalize page' link.
2) Copy path of the page from 'About this page' link. (for ex: /oracle/apps/fnd/framework/toolbox/tutorial/webui/PoSearchPG)
3) Once you are done with personalization,  go to 'Functional Administrator -> Personalization -> Import/Export'
4) Expand the directory structure upto /oracle/apps/fnd/framework/toolbox/tutorial/webui.
Under webui, if personalization is done at site  level, its personalization file will be there at customizations/site/0.
At responsibility level -> customizations/responsibility/<resp_id>.
At function level -> customizations/function/<function_code>


5) So expand the appropriate folder under webui, select the file and click on 'Export to File System' button. It should show a confirmation message as below:

6) This generates xml file on unix server with the same name as that of page having all details of personalization on that page.
(Path on unix comes from profile 'FND: Personalization Document Root Path')
7) In order to migrate, move this file to unix server of another instance at path <profile 'FND: Personalization Document Root Path'>/ followed by same directory structure.
8) Now login to another instance and go to 'Functional Administrator -> Personalization -> Import/Export -> Exported Personalizations'.
9) Again expand the directory structure as we did in step4, select the file and this time click on 'Import from File System' button.

Note: If the personalization is done at responsibility level, resp_id may vary from instance to instance. So we have to change to folders and xml file accordingly.

Migration of Controller Extension

1) Assuming that controller is extended and compiled in JDeveloper. Also the custom controller is attached to the page using personalization. (Controller Extension)
2) Firstly, move the class file of custom controller from <JDEV_USER_HOME>\myclasses to $JAVA_TOP followed by similar path.
3) Then migrate the personalization part of attaching the custom controller to the page. (Same steps as mentioned above in Migration of Personalization).

Migration of Substitutions

1) Extend BC4J component like VO, AM.. in JDeveloper and rebuild the same.
2) Once done with extension, go to project properties -> Business Components -> Substitutions
3) Select the base BC4J component on Available side and extended component on Substitute side and click on add as shown below:


4) This will be added in the <proj>.jpx file.
5) In order to migrate this to instance, first move the xml and .class file related to extended BC4J component from <JDEV_USER_HOME>\myclasses to $JAVA_TOP.

6) Import substitution using this jpx import command.

This is only one time process and for further migration from instance to instance, we can do this from 'Functional Administrator -> Personalization -> Import/Export'.

If the migration is done first time to any instance, there is no need to bounce the server. However, if we are remigrating files at $JAVA_TOP, we have to bounce OA core and apache server using below commands:

   cd $ADMIN_SCRIPTS_HOME
   adapcctl.sh stop
   adoacorectl.sh stop
   adapcctl.sh start
   adoacorectl.sh start












1 comment:

  1. How to find how many custom oaf pages in one instance

    ReplyDelete