Extending Ebs
Extending Ebs
Extending Ebs
OR
Finding joy in our job
Why APEX?
Rapid Application Development
Shorter learning curve than OAF, ADF, MAF
Avoid customizations
No impact on patching and upgrading
Fun and Free! But check with Oracle
EBS limited use license does NOT allow for an
additional schema
White Paper
Extending Oracle E-Business Suite Release 12.1
and above using Oracle Application Express
Revision 2.01,
http://www.oracle.com/technetwork/developertools/apex/learnmore/apex-ebs-extension-white-paper345780.pdf
30,000 ft Overview
Create an APEX Application
Configure APEX Login Process
Define APEX Authorizations
Define EBS Profile Option and Functions
Link Functions to Menu and Responsibility
What is APEX?
Rapid Application Development tool
Similar to Microsoft Access
Flows Oracle Platform Project Marvel HTML DB Application Express (APEX)
Tightly coupled with the Oracle database
Declarative (what to do rather than how to do it)
Use Wizards and Templates to create applications
The applications created by APEX are accessed
through a web browser
Architecture
Applications are stored as meta-data in the
database (Not the APPS server)
Procedures generate HTML
The meta-data is used to render pages and
processing
Can be installed on 10gR2 and above
Development and runtime access is 100 %
browser based (no client software - ever)
Architecture
E-Business Suite Database
Grant Select
APPS
Schema
CUSTOM
Schema
EBS APIs
APEX
Engine
DESC F;
Changes in R12
In 11i, access to APEX apps was processed via
mod_plsql in Application Server
In R12, enabling mod_plsql is not supported and
can put your support at risk
For R12, use Apache, Oracle REST Data Services
within Oracle Glassfish or WebLogic, or
Embedded PL/SQL Gateway
APEX will use JSP but wizards make it simple
Apache
Highly scalable
Doesnt support some APEX 4 features
Apache
Very scalable
Proven technology
Licensing may be an issue
Doesnt support some newer APEX functions
RESTful web services
PDF printing
Key Terms
Representational State Transfer (REST) is an architectural
style that specifies constraints, such as the uniform interface,
that if applied to a web service induce desirable properties,
such as performance, scalability, and modifiability, that
enable services to work best on the Web. -Whew!
A RESTful service provides access to resources (web pages,
pictures, videos, information, etc.) in a lightweight,
maintainable and scalable manner.
Bottom line difference for most developers:
myserver.com:8080:/apex/f?p=400:103
myserver.com:8080:/ords/f?p=400:103
Key Terms
Schema (database):
Collection of database objects owned by a user
Parse As Schema the default schema of the
user/app
Workspace (APEX):
Logical container for one or more application(s)
Separate, self contained development
environment
Contains applications, users, and schemas
Key Terms
Users:
Instance Administrator
Workspace Administrator
Developer
End User
Key Terms
Session: a series of related browser requests
Session State: variables representing APEX items
and their values, maintained on the server
Submit: an operation that saves the values of the
items in the corresponding session state variable
before rendering a target page
Redirect: an operation that renders a target page
without saving values to the session state
Potential Gotchas
List a navigation aid
Overview
Suggest you create an APEX application before
starting the White Papers application.
Get familiar with newer screens in the wizards and
with the location of development items.
Some steps have been combined in newer
versions
Plenty of good books, websites, and blogs.
Differences in 4.2
Differences in 5.0
Differences in 5.0
Multi-item editing
Differences in 5.0
Free Workspace
Good place to learn APEX fundamentals
No E-Business Suite
https://apex.oracle.com/
Install APEX
Download APEX (5.0) and Installation Guide from
OTN
Install APEX (in database)
Download and install Glassfish
Download and register Oracle REST Data
Services with Glassfish (war file)
Install APEX
Configure database for APEX
Create a user/schema in the database
(APEX_USER)
Create views and instead-of triggers in APPS
Grant select on views to APEX_USER
Configure APEX
Within APEX
Create a workspace
Create users
Developer(s) to create app
End User(s) to test
Create the application
set pages 0
spool grantem.sql
SELECT 'grant select, insert, update, delete on
'||owner||'.'||table_name||' to polk_apex_sand;'
FROM dba_tables
WHERE owner = 'APPS';
spool off
Better Solution to
Public API Problem
create or replace procedure polk_create_irec_user
( v_user_name IN varchar2,
Definer = author
v_password
IN varchar2,
v_email
IN varchar2,
Not current user
v_last_name
IN varchar2,
Compile as APPS
v_first_name IN varchar2 )
authid definer
Grant execute to apex_user
AS
Call from apex_user
BEGIN
apps.irc_party_api.create_user
(p_user_name
=> v_user_name
,p_password
=> Thursday123'
,p_start_date
=> 16-APR-2015'
,p_responsibility_id
=> 23350
,p_resp_appl_id
=> 800
,p_security_group_id
=> 0
,p_email
=> v_email
,p_last_name
=> v_last_name
,p_first_name
=> v_first_name );
commit;
dbms_output.put_line ('User:'||v_user_name||'Created Successfully');
EXCEPTION
when others then
dbms_output.put_line (Cant create User due to'||SQLCODE||' '||SUBSTR(SQLERRM, 1, 100));
rollback;
END;
Install APEX
Apexins.sql Parameters
APEX tablespace - APEX application user
Not SYSAUX!
Files tablespace - APEX files
Not SYSAUX!
Temporary tablespace
Images - /i/ - virtual directory for APEX images
Install APEX
Change Admin password apxchpwd.sql
Alter User APEX_PUBLIC_USER Account Unlock
Alter User APEX_PUBLIC_USER Identified by
<password>;
Install APEX
Password Expiration in 11g
In 11g default profile PASSWORD_LIFE_TIME is
180 days. At expiration the APEX instance will be
unusable until the password is reset.
Consider creating separate profile for APEX:
CREATE PROFILE APEX_PROFILE LIMIT
PASSWORD_LIFE_TIME UNLIMITED;
ALTER USER APEX_PUBLIC_USER PROFILE APEX_PROFILE;
Deploy to Glassfish
Oracle REST Data Services
Installation, Configuration, and Development Guide
Release 3.0
Chapters on:
1. Configuring ORDS
2. Deploying ORDS to:
Glassfish
Weblogic
Apache Tomcat
Configure ORDS
PL/SQL Gateway is not Embedded PL/SQL
Gateway!
If you plan to use APEX with ORDS you MUST configure the
PL/SQL Gateway.
This step creates the apex.xml file. Without an apex.xml file APEX
will not be accessible (or any other PL/SQL procedures).
Security
Authentication
Who are you?
Controls access to application (the doorman)
Authorization
What are you allowed to do? (the bartender)
Controls access to forms, pages, buttons, etc.
and to data
Custom Authorization
Note: There is a typo in Revision 1 of the White Paper.
The last RETURN statement should read function_test not
function.test (underscore, not period)
--Included in apexebs_apps_setup.sql
Custom Authorization
Edit the Page
Double click the page title
Terminology Gotchas
Page 0 is now the Global Page
One Global Page per application, per interface
Desktop UI
Mobile UI
apexebs_apex_setup.sql
As apex_ebs schema
apexebs_apex_application_rev2.sql
Within the application builder (creates the app if you dont
want to do it manually)
Be sure to download the _rev2 file from the White Paper,
not the version in Note 1306563.1 as of February 2015
Create A Form
Create a Form
Forms perform insert, update and delete
operations on table rows in the database. The
rows are identified using either a Primary Key
defined on the table, or the ROWID pseudo
column, which uniquely identifies a row in a table.
Select "Managed by Database" if you would like to
use the ROWID. Otherwise select the Primary Key
column(s) defined for your table or view.
Forms support up to two columns in the Primary
Key. For tables using Primary Keys with more than
two columns, the ROWID option should be used
Create a Form
Create a Form
Profile Option
Define Function
GWY.jsp?targetAppType=APEX&p=105:3:::::
EBS_RESP_ID, EBS_APP_ID,
EBS_SEC_GROUP:[RESPONSIBILITY_ID],
[RESP_APPL_ID], [SECURITY_GROUP_ID]
EBS_APP_ID,
EBS_RESP_ID,
EBS_SEC_GROUP:
Menu
Responsibility
User
Security
References