Professional Documents
Culture Documents
Oracle Application Framework: by Sridhar Yerram
Oracle Application Framework: by Sridhar Yerram
By Sridhar Yerram
12/01/20 1
Outline
• Introduction to OA Framework
– Definitions
– General Principles
• MVC Architecture
– Understanding the basics of Model
• View Objects
• View Links
• Entity Objects
• Entity Experts
• Validation AM
• Validation VO
– Understanding the basics of View
– Understanding the basics of Controller
• Jdeveloper Structure and configuration in your desktop
• Fundamental OA Framework UI Objects
– Checkboxes
– Pop Lists
– Simple List of Values
– Exception Handling
– Advanced Tables
– Partial Page Refresh
– Dialog Pages
– Passive Criteria List of Values
12/01/20 2
Outline
• Implementing Server Side Features
– Calling PL/SQL procedures and functions
– Error Handling
• Debugging OA Framework Applications
– Debugging OA Framework Applications using Jdeveloper
– Logging Infrastructure in OA Framework
• Finding out the right version of Jdeveloper IDE
• List of OAF Files Generated and their importance
• Directory Structure of Application Server
• Deploying OA Framework Applications
• OA Framework Personalization Concepts
– Personalization
– Extension
– Substitution
• SPEL
• JDR(Table/Packages)
12/01/20 3
Overview
Oracle Application Framework(OA Framework) is a proprietary framework
developed by Oracle Corporation for application development within the
Oracle E-Business Suite.
Available to customers for personalization, customizations and custom-
application development.
The OA Framework is a Model-view-controller (MVC) framework built using
J2EE (Java 2 Platform, Enterprise Edition)technologies.
Historical Perspective
Very first HTML screen in oracle apps was created using PLSQL code, using PL/SQL
toolkit.
AK Developer, repository for storing structure and definition of the WebPages.
Current Technology OAF with MDS
12/01/20 4
Overview (Cont)
• OA Framework is based on JSP technology,
which executes in a servlet engine. When the
browser issues an OA.jsp request for one of
the Self-Service pages, page processing takes
place within a servlet engine which, in turn,
can access the application data as well as user
interface metadata from the database.
12/01/20 5
Overview (Cont)
• Browser Support
– Firefox
– IE
• Session
– ICX:Session Timeout
– ICX:Limit Time
12/01/20 6
Overview(Cont)
• User selects a responsibility
and a function
• MDS Tables(JDR_*)
• XML representation cached
in memory
• Web Bean hierarchy is
instantiated, top level bean
is pageLayoutBean and then
for each component of the
page there is a web-bean
12/01/20 7
OA Framework Features
Advantages
• Enterprise-Grade Performance and Scalability
• Improved End User Productivity
• Highly extensible architecture
• Browser Look and Feel (BLAF terminology) for
all applications
• Open industry Standards such as XML, HTML,
Java, JSP, SQL and Web Services.
12/01/20 8
OA Framework Architecture
• OA Framework architecture is based on
Model-View-Controller (MVC)design pattern.
12/01/20 9
12/01/20 10
Components of MVC Architecture
• Model:
– Data
– Implemented using Oracle Business Components for Java (BC4J).
• 1.EO (Entity Object)
• 2.VO (View Object)
• 3.AM (Application Module)
– AM is a container for EO, VO, viewLink and entityAssociation.
– AM retention
» Get request not retained by default
» Multipage transactions have same rootAM, Use retainAM=Y
» Post request by default, it is retained
» Originally Bc4j was named jbo(Java Business Objects)
• View:
– User Interface.
– Implemented using an Oracle technology called UIX. (UIX = User Interface XML).
• Controller:
– Code
– User actions are handled by the OA Controller. (Ex: Clicking SUBMIT button)
12/01/20 11
Components of MVC
Architecture(Cont)
12/01/20 12
Interaction between model, view and controller
12/01/20 13
Entity Object (EO)
12/01/20 14
View Object (VO)
• Two types
◦ 1. SQL based
◦ 2. EO based
• Represents a query result.
• Is used for joining, filtering, projecting, and
sorting your business data.
• Can be based on any number of entity objects
(EOs) and provides access to EOs.
12/01/20 15
View Links
• View link defines a relationship between two
view objects that BC4J uses to automatically
query and coordinate the destination view object
based on the current source view object.
◦ View links can be based on an association or a
declarative join relationship between two view
objects.
For example, suppose two tables have a master-detail
relationship based on a foreign key. The corresponding entity
objects are related via an association, and view objects based
on those entity objects can be related by a view link based on
the association.
12/01/20 16
Application Module (AM)
12/01/20 17
Web Bean Architecture
• Each OA Framework web bean also implements a group of interfaces whose
implementations collectively define the behaviors that the OA Framework adds to the base
UIX beans.
• oracle.appps.fnd.framework.webui.beans.OAWebBean - defines core behavior common to
all web beans (for example, among other key behaviors, this defines the processRequest,
processFormData and processFormRequest methods that individual beans implement for
themselves)
• oracle.apps.fnd.framework.webui.OAWebBeanConstants - a collection of constants used in
the view/controller modules
• oracle.apps.fnd.framework.webui.beans.OAWebBeanData - defines common
personalization definition and data source management behavior
• oracle.apps.fnd.framework.webui.beans.OAWebBeanContainer - defines the characteristics
of all web beans that can act as containers for other web beans. For instance, all the layout
web beans implement this interface. Only beans which implement this interface can have
associated controllers.
• OAWebBean<Type> - defines a bean's inherent behaviors within the context of the OA
Framework.
• For example, the OATableBean implements the
oracle.apps.fnd.framework.webui.beans.OAWebBeanTable interface.
12/01/20 18
Web Bean Architecture
12/01/20 19
MDS – Meta Data Service
• Meta:- In technical world, meta work symbolizes dictionary. Think of a web page
broken into small units which are fields, buttons, list boxes. These small individual
units[fields, buttons etc] are stored in a dictionary, in the database. These units
when combined together, they become a webpage that gets rendered on the
browser.
• Data:- Those meta pieces are not stored as binary files, but as data in tables. Those
tables begin with jdr, for example JDR_ATTRIBUTES, JDR_ATTRIBUTES_TRANS,
JDR_COMPONENTS & JDR_PATHS. The definition and relationship of each
field/region/component is stored in these JDR tables. OA framework reads that
data when you request a page. The page structure is then built based on
MetaData.
• Service:- Meta Data is available as a service(plain service not webservice). The data
is there in JDR tables, but all such data has to be co-related, all fields,
regions,buttons etc have to be clubbed into a meaningful manner to make a web
page. You can say that MDS provides service to store & return page definitions.
MDS collates those definitions in components/fields in a meaningful manner to
build a page.
12/01/20 20
View in MVC Architecture
12/01/20 21
Controller (CO) in MVC Architecture
12/01/20 22
Controller Class
12/01/20 23
Onion Architecture of OA Framework
12/01/20 24
MVC Architecture
12/01/20 25
Key Terms
Installation
Setting up E-BS from distribution media to the host OS
Configuration
Process of setting proper parameters, needs SME from various business domains
Personalization
Process of declaratively altering page's UI to meet business needs
Extension
Process of altering page's functionality programmatically(using PL/SQL, java)
Customization
Process of creating new pages
Deployment
Process of moving personalization/extension/customization from development instance to test/prod instance.
12/01/20 26
JDeveloper Structure (Cont.)
12/01/20 27
Finding out the right version of
Jdeveloper IDE
ATG Release 12.1 Version JDeveloper 10g Patch
12/01/20 28
OAF File Types & Extensions
File Descrip Java Package Structure Files File Stored in
Types tion Generat DB/Middle
ed Tier
PG Page File <clientName>.oracle.apps.fnd.<APPL_TOP>. XML DB
File webui
CO Controll <clientName>.oracle.apps.fnd.<APPL_TOP>. Java Middle tier
File er File webui
12/01/20 30
OAF UI Objects
• CheckBoxes
• Pop Lists
• Simple List of Values
• Exception Handling
• Advanced Tables
12/01/20 35
OAF UI Objects- Checkbox
12/01/20 36
OAF UI Objects- Pop Lists
• Step 1: Create a view object to be used by your poplist. • Step 7: (optional) If the poplist should
Per the OA Framework Package / File / Directory
standards, you should create this object in a read/write its selected value from an underlying
*.poplist.server package. data source, set the View Instance and View
• Step 2: Create an item whose Item Style is
messageChoice . Assign an ID in accordance with the OA Attribute values accordingly as you would for
Framework Package / File / Directory standards. any other data entry component. The View
• Step 3: Apply an attribute set as required by the OA Instance value should not be same as the
Framework View Coding Standards.
• Step 4: Specify the Prompt (if not specified by the
Picklist View Instance value.
attribute set).
• Step 5: Specify the view object that you created in Step
1.
◦ set the Picklist View Instance property (for example,
PoplistVO1). In this case, remember to add your poplist
view object to the root UI application module for the page
(or application module for the shared regions) that will
include this poplist.
• Step 6: Map the poplist to its view object display and
developer key attributes. Set the Picklist Display
Attribute to the view object attribute whose value you
want to display in the poplist. Set the Picklist Value
Attribute to the view object attribute whose value you
want to use as the internal developer key. To use our
lookup code example above, we would set the Picklist
Display Attribute to Meaning, and the Picklist Value
Attribute to LookupCode.
12/01/20 37
OAF UI Objects- Simple List of Values
12/01/20 38
OAF UI Objects- Advanced Tables
12/01/20 39
OAF UI Objects- Partial Page Rendering
• example of PPR refresh behavior for the Hide/Show component.
12/01/20 40
Dialog Pages
• Messaging can be introduced into application
flows when an Error, Information, Warning,
Confirmation, or Processing Message needs to
be displayed.
• There are two basic kinds of messaging flows:
◦ Inline Message - The message appears inline on a
page around the region item that requires
attention. The inline message is also repeated in
the message box on top of the page.
◦ Dialog Page - The message appears on it's own
dialog page in the flow.
12/01/20 41
Dialog Pages
Warning dialog page.
12/01/20 42
Dialog Pages
• The short hints render
immediately below the item as
shown in Figure 1 (see the
Purchase Order field).
43
Calling PL/SQL procedures and functions
12/01/20 44
Error Handling
• The OA Framework handles three basic types of exceptions:
general, validation and severe.
– General Exception : Errors in the BC4J framework are handled by
throwing an implicit (runtime) exception of the type
oracle.jbo.JBOException.
– Validation Exceptions : Validation exceptions are thrown from entity
objects and view objects for both row and attribute level validation
failures.
• oracle.apps.fnd.framework.OAAttrValException - specialization of
OAException used for attribute level validation failures
• oracle.apps.fnd.framework.OARowValException - specialization of
OAException used for row (entity) level validation failures
– Severe Exceptions : Severe (or "fatal") exceptions include unexpected
system-level errors (like a NullPointerException) and selected
JBOExceptions like NoDefException. You can also deliberately throw a
severe exception in your code.
12/01/20 45
Directory Structure of Application Server
12/01/20 46
Deploying OA Framework Applications
D:\RUP6\jdevhome\jdev\myclasses\te
mpel\oracle\apps\xxtmg\pdms\msd\serv
er
12/01/20 47
Deploying OA Framework Applications
12/01/20 48
Deploying OA Framework Applications
• Attach the function with a menu and then run from the
respective responsibility.
12/01/20 49
OA Framework Personalization Concepts
• Profile options :
– persnoalize Self-Service Defn
– FND:personalization region link enable
– Disable Self-Service personal
12/01/20 51
Personalization(Cont)
• How it is done
– “Personalize Page” link
– Functional-Administration responsibility
– Import/Export
• Common Types
– Changing labels, prompts
– Hiding or adding table columns
– Re-ordering UI elements
– Adding buttons, labels, flexfields
– Adding regions
12/01/20 52
Personalization(Cont)
• Involve Some Programming
– Controller
• Instantiate custom VO
• Add UI elements which cant be done via personalization
• VO Extension
– This is needed when value to displayed to the user
on the screen is not available in underlying VO
12/01/20 53
Partial Page Rendering and SPEL
• PPR: Ability to partially render the page
• SPEL : Simplest Possible Expression Language
• ${oa.xxCustomerVO.isNameReadOnly}
• ${oa.FunctionSecurity.NAME_READ_ONLY}
12/01/20 54
JDR Tables
JDR_PATHS Stores document paths, packages and there parent child relationship.
Primary Key: PATH_DOCID
12/01/20 55
Query1:
select distinct path_type
from JDR_PATHS;
/
Result:
DOCUMENT (for pages and regions)
PACKAGE (for packages/directories path)
Query2:
select *
from JDR_PATHS
where path_name = 'HelloWorldPG' ;
/
-- Get familiar with the table structure, path_type will be 'DOCUMENT' for this
record.
Query3:
select *
from JDR_PATHS
where path_docid = <path_owner_docid from query2>;
/
-- This record will point to the parent package/directory.
12/01/20 56
Query4:
select *
from JDR_COMPONENTS
where comp_docid = <path_doc_id>;
/
-- This will query components of the DOCUMENT. There are no records for a
PACKAGE type.
Query5:
select * from JDR_ATTRIBUTES
where att_comp_docid = <path_doc_id>
and att_comp_seq = <sequence id of component whose properties you wish to
check>;
/
12/01/20 57
12/01/20 58
jdr_utils.listdocuments('/learning/oracle/apps/', TRUE);
jdr_utils.printdocument(p_document => '/learning/oracle/apps/fnd/webui/DeptPG');
JDR Packages
• JDR_CUSTOM_INTERNAL
• JDR_DOCBUILDER
• JDR_MDS_INTERNAL
• JDR_UTILS
• SELECT * FROM ALL_OBJECTS WHERE object_name like 'JDR_%' AND OBJECT_TYPE IN ('PACKAGE') ;
12/01/20 63