Top-Rated Free Essay

Oracle Application Framework

Topics: File system, Computer file, Oracle Corporation / Pages: 8 (1989 words) / Published: Dec 9th, 2013
Page | 1
This exercise is to demonstrate how extract the required classes and xml files into JDeveloper, ready for an extension on an E-Business Suite page. We then see how to deploy that extension.
We have kept the extension very simple – we will simply add a default value into the Purpose field of the Create Expense Report page. This simple example is used to enable us to concentrate on the extraction and deployment processes. PREPARE FOR EXTENSION
Because this is a Self-Service page, in order to test, our user needs to be associated with a person. In addition our user needs the grants associated with the iExpenses functions. Therefore we need to edit user FWKTESTER and associate with a person (Pat Stock), and add the iExpenses responsibility.
Responsibility: System Administrator >
Define User: FWKTESTER
Associate FWKTESTER with person - Pat Stock
Add responsibility: iExpenses ANALYZE
1. Login to the E-Business Suite instance as FWKTESTER/fwkdev
2. Select the iExpenses responsibility.
3. Click the Create Expense Report button.
4. Click About This Page link and analyze page information:
Page: /oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG
Attribute: messageTextInput: Purpose
View Attribute: Description
View Object: ExpenseReportHeadersVO
Entity Object: oracle.apps.ap.oie.server.ExpenseReportHeaderEO
Controller: oracle.apps.ap.oie.webui.HeaderCO
Root AM: oracle.apps.ap.oie.server.WebExpensesAM (root)
Nested AM: oracle.apps.ap.oie.server.GeneralInfoAM
Other views contained in packages: oracle.apps.ap.lookups.server Page | 2 oracle.apps.ap.oie.entry.accounting.server oracle.apps.ap.oie.entry.advances.server oracle.apps.ap.oie.entry.header.webui oracle.apps.ap.oie.entry.server oracle.apps.ap.oie.lov.server oracle.apps.ap.oie.notes.server oracle.apps.ap.oie.server oracle.apps.ap.oie.setup.accounting.server oracle.apps.ap.oie.webui EXTRACT CLASSES AND XML
The majority of the VOs used in our page exist in the oracle.apps.ap.oie package. We need to extract all the classes in this package into JDeveloper.
1. Log on to the oracle instance provided by the instructor using NXCLIENT.
2. Start a terminal process giving access to the Linux file system.
3. Create matching directory structures in JDeveloper Home. cd $JDEV_USER_HOME/myclasses mkdir oracle/apps/ap cd $JDEV_USER_HOME/myprojects mkdir oracle/apps/ap
4. Change to the applmgr (E-Business Suite owner) user. su applmgr password: oracle
5. Source the E-Business Suite instance environment variables. cd $APPL_TOP
EGxxxx_egxxxx.env (where xxxx is the assigned oracle instance)
6. Change to the $JAVA_TOP directory to get the needed java classes. cd $JAVA_TOP cd oracle/apps/ap zip –r oie
7. This file is owned by applmgr. Change the ownership so that any user can use the zip file. chmod 777 exit Page | 3
8. Change directory to $JDEV_USER_HOME/myclasses/oracle/apps/ap. cd $JDEV_USER_HOME/myclasses/oracle/apps/ap
9. Copy the zip file to this directory and extract the data. This allows the pages to run in jDeveloper. cp $JAVA_TOP/oracle/apps/ap/ . unzip –d . GET THE PAGE FOR THE EXTENSION PROJECT cd $JDEV_USER_HOME/myprojects java /oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG -rootdir $JDEV_USER_HOME/myprojects -username apps –password apps -dbconnection VERIFY JDEVELOPER SETUP
1. Start JDeveloper from the terminal session by entering JDev.
2. Click on the connection tab then expand Database to verify a database connection is still in place (if not, set up a database connection).
3. Click on the Application Navigator tab and verify the ClassLabs workspace is still in place. This workspace will hold your extension project. CREATE THE EXTENSION PROJECT
1. Highlight the ClassLabs workspace and right click.
2. Select the New OA Project from the selector pane. Click Next on the welcome pane if it appears.
3. Set the Project Name to ExtProject.
4. Confirm the Directory Name is set to $JDEV_USER_HOME/myprojects.
5. Set the Default Package to .oracle.apps.ap.oie.entry.header.webui and select Next button twice skipping the 2 of 3 Database Connection pane.
6. Set the DBC File Name to the location of the .dbc file used. Other values may be set or reset if needed.
User Name: fwktester
Passwork: fwkdev (remember case sensitive in R12)
Application Short Name: AK
Responsibility Key: FWK_TBX_TUTORIAL
7. Click the Finish button to complete the project set up.
When the project is complete the libraries that you unzipped to $JDEV_USER_HOME/myprojects should show up in the list of available libraries containing both the classes and page and region xml.
The project may take a while to collate all the classes. Go and get a coffee…
Page | 4
8. Save your work.
9. To finalize project setup: right click ExtProject and select Project Properties from the display pane.
10. Expand Oracle Applications (at bottom of the navigator pane) and select Run Options.
11. Shuttle OADiagnostics from the Available Options to the Selected Options.
12. Click the OK button and then save your work. CORRECT FILES CONTAINED IN THE PROJECT
When you attempt to run the GeneralInformationPG, you will come across errors.
1. Delete any files in error from myprojects directory, eg:
2. Upload missing elements, eg: oracle.apps.ap.oie.entry.server.ExpAttendeesVO For each missing element, you need to:
Change user to applmgr
Navigate to the file directory in $JAVA_TOP (eg oracle/apps/ap/oie/entry/server)
Change ownership on the file (eg chmod 777 ExpAttendeesVO)
Exit applmgr
Copy the file into the corresponding folder in $JDEV_USER_HOME/myclasses
Copy the file into the corresponding folder in $ JDEV_USER_HOME /myprojects
Test the page again.
Continue until the page runs adequately – so that you can see the Purpose field. It doesn’t matter if the message region contains errors – you are not extending that region. EXTEND THE PAGE – CREATE A NEW EO TO CONTAIN THE OVERLOADED METHODS.
1. Right click on ExtProject project and select New… from the resulting menu.
Page | 5
2. From the Categories pane select Business Tier->ADF Business Components.
3. In the Items pane select Entity Object then press the OK button. If the next screen is the Welcome screen press Next.
4. Set the Name field to ExtExpenseReportHeaderEO.
5. Set the Package field to:
6. Use the browse button to set the Extends Entity field to: oracle.apps.ap.oie.server.ExpenseReportHeaderEO 7. Press the Next button.
8. In the Step 2 of 5: Attributes pane press the New from Table button to acquire the attributes supported by the EO. Shuttle all attributes in the Available pane to the Selected pane by pressing the >> button.
9. Remove the RowId attribute from the Selected pane by selecting it and pressing the < button.
10. Press the Next button 2 times to get to the Step 4 of 5: Java pane. Deselect the Accessors checkbox, and select the Create checkbox. Press the Next button.
11. Do not generate the Default View Object. Leave this checkbox unchecked.
12. Press the Finish button to create the new Entity Object. ADD THE DEFAULTING LOGIC
1. Edit the ExtExpenseReportHeaderEOimpl java class.
2. Next set the so that when a new record is created the Purpose field holds the value of “Customer Visit”.
The attribute name for the Purpose field is Description. The constructor method is called create(). Edit the method to make it look like the code below: public void create(AttributeList attributeList){ super.create(attributeList); setDescription("Customer Visit");
}// end create()
3. Now that the code changes are in place a substitution is needed so that the new EO is used in place of the old EO. Right click on ExtProject and select Project Properties from the menu.
4. Expand Business Components and select Substitutions.
5. In the Available pane expand oracle.apps.ap.oie.server and select ExpenseReportHeaderEO.
6. In the Substitute pane expand .oracle.apps.ap.oie.server and select ExtExpenseReportHeaderEO.
7. Click the Add button followed by the OK button to create the substitution.
Page | 6
8. Click the Run/Debug category in the Project Properties.
9. Click the Edit button
10. Add the following to the Java Options field:
-Djbo.project=ExtProject (or whatever the name of the project is)
Make sure there is a blank space between the dash and whatever precedes it.
11. Click the OK button.
12. Click the OK button.
13. Save your work. The ExtExpenseReportHeaderEO will now run in place of the ExpenseReportHeaderEO.
14. Run the page – the Purpose field should now have a default value of “Customer Visit”. DEPLOY THE CREATED CLASSES AND XML TO $JAVA_TOP
You have only modified one class file, ExtExpenseReportHeaderEOImpl.class, which has been compiled into JDEV_USER_HOME/myclasses//oracle/apps/ap/oie/server. You also need to deploy the corresponding ExtExpenseReportHeaderEO.xml file, and the associated server.xml file.
1. Save everything and shut down JDeveloper.
2. Change directory to $JDEV_USER_HOME/myclasses. cd $JDEV_USER_HOME/myclasses
3. Create a zip file that contains the new or modified class and xml files. zip oieDeploy -@
A blank line with a blinking cursor displays. Enter the following one line at a time with a carriage return after each line.
d (hold down the control key and press "d")
4. Modify the file so that any user may use it. chmod 777
5. Change to the applmgr user id to complete the java deployment. su applmgr password: oracle
6. Set the environment variables for the Oracle instance. cd /appltop/apps/apps_st/appl
EGxxxx_egxxxx.env (where xxxx is the assigned oracle instance)
Page | 7
7. Copy the file to $JAVA_TOP. cd $JAVA_TOP cp $JDEV_USER_HOME/myclasses/ ./
8. Unzip the completing the java deployment. unzip –d ./ DEPLOY THE SUBSTITUTION INTO THE MDS
1. Change back to $JDEV_USER_HOME/myprojects and look for ExtProject.jpx. cd $JDEV_USER_HOME/myprojects ls ExtProject*
2. Load the ExtProject.jpx file into the MDS using the jpx loader provided by Oracle. java $JDEV_USER_HOME/myprojects/ExtProject.jpx -username apps -password apps -dbconnection STEP 7.3 BOUNCE THE E-BUSINESS SUITE INSTANCE
You need to bounce the E-Business suite in order to clear the cache and allow the new page to be run from the menu.
1. Return to the NXCLIENT terminal window which should still be using APPLMGR user id.
2. Stop the HTTP (adapcctl) and OACORE OC4J (adoacorectl) services:.
3. Start the HTTP (adapcctl) and OACORE OC4J (adoacorectl) services:.
5. Login to the E-Business Suite instance as FWKTESTER/fwkdev
6. Select the iExpenses responsibility.
7. Click the Create Expense Report button.
The newly deployed page should run and be fully functional. You should see a default value of “Customer Visit” in the Purpose field. STEP 7.5 CLEANING UP DEVELOPMENT ENVIRONMENT
Now you have successfully deployed the application, you can clean up the development environment.
Page | 8
1. Return to the Linux server terminal window.
2. Return to the $JDEV_USER_HOME directory: exit (log off from applmgr) cd $JDEV_USER_HOME/myclasses
3. Delete the directory from myclasses. rm –rf
4. Restart JDeveloper to remove the ExtProject from JDeveloper.
JDev (starts jDeveloper)
5. Select ExtProject in the navigator pane.
6. In the File menu select Close to close the project.
7. Right click on the ExtProject and select Delete to remove the project from JDeveloper.
8. Close JDeveloper for the next step.
9. Change directory to myprojects: cd $JDEV_USER_HOME/myprojects
10. Remove the ExtProject files from the $JDEV_USER_HOME/myprojects directory. rm –rf rm ExtProject.jpr rm ExtProject.jpx

You May Also Find These Documents Helpful

  • Oracle Real Application Clusters
  • Oracle
  • Oracle
  • oracle
  • Oracle
  • Oracle EBS
  • Oracle
  • Oracle
  • Oracle Pcp
  • Oracle Rac