EBS Forms Migration API Beast practive

download EBS Forms Migration API Beast practive

of 57

description

EBS Forms Migration API Beast practive

Transcript of EBS Forms Migration API Beast practive

  • 7/18/2019 EBS Forms Migration API Beast practive

    1/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 121

  • 7/18/2019 EBS Forms Migration API Beast practive

    2/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 122

    Best Practices for UsingOracle E-Business SuiteSDK for Java with OracleADF

    Juan Camilo RuizPrincipal Product Manager, ADF

    Sara Woodhull

    Principal Product Manager, EBS ATG

  • 7/18/2019 EBS Forms Migration API Beast practive

    3/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 123

    3 Copyright 2012, Oracle and/or its affiliates. All rights

    reserved.

    The following is intended to outline our general product direction.

    It is intended for information purposes only, and may not be

    incorporated into any contract. It is not a commitment to deliver

    any material, code, or functionality, and should not be relied upon

    in making purchasing decisions. The development, release, and

    timing of any features or functionality described for Oracle's

    products remains at the sole discretion of Oracle.

  • 7/18/2019 EBS Forms Migration API Beast practive

    4/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 124

    ProgramAgenda

    Review of previous EBS SD

    Building ADF applications w

    EBS SDK: Best Practices

  • 7/18/2019 EBS Forms Migration API Beast practive

    5/57Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 125

    Review of PreviousEBS SDK Webcast:Using Oracle ADF withOracle E-Business Suite

  • 7/18/2019 EBS Forms Migration API Beast practive

    6/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 126

    Review of Previous EBS SDK Webcast

    Choose the right technology for your EBS extension OA Framework

    Oracle ADF

    Both (hybrid pages)

    Right technology

  • 7/18/2019 EBS Forms Migration API Beast practive

    7/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 127

    Choose OA Framework If You Need to

    Use Flexfields Have same look and feel as the

    E-Business Suite application

    Use OA Framework

    Personalization

    New Applications

  • 7/18/2019 EBS Forms Migration API Beast practive

    8/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 128

    Choose Oracle ADF If You Need to

    Support multiple data sources such asWeb Services, URL, Java

    Have multi-channel rich user interfaces

    Same development platform as Oracle

    Fusion Applications

    Support mobile devices

    New Applications

  • 7/18/2019 EBS Forms Migration API Beast practive

    9/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 129

    Or Choose OAF Pages with ADF RegionsHybrid Page lets OAF fields coexist with ADF

    OAF M

    Em

    Rich Content

    Container in OAF

    Other

    such a

  • 7/18/2019 EBS Forms Migration API Beast practive

    10/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1210

    Oracle E-Business Suite SDK for JavaFor Releases 11i to 12.x of Oracle E-Business Suite

    E-Business Suite SDK JAAS

    Language

    InfoMessagesi18n

    Session Management

    AppsDataSource

  • 7/18/2019 EBS Forms Migration API Beast practive

    11/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1211

    Review of Previous EBS SDK Webcast

    Use Oracle E-Business Suite SDK for Java with Oracle AD AppsDataSource

    EBS security

    With or without EBS context

    JAAS provide provides only credentials and roles

    Session management provides credentials, responsibilities

  • 7/18/2019 EBS Forms Migration API Beast practive

    12/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1212

    Oracle E-Business Suite SDK for Java

    Session refers to Oracle E-Business Suite ICX session User session or EBS session

    Context information such as user name, responsibility, NLS lo

    information

    Identified by ICX session cookie on browser

    Shared session means same EBS user session across te

    Session terminology

  • 7/18/2019 EBS Forms Migration API Beast practive

    13/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1213

    Organization Chart in HCM

    Available in Release 12.1 HRMS RUP5 - Patch 13418800(R12.HR_PF.B.Delta.5)

    HCM embeds ADF in OA Framework using EBS SDK

  • 7/18/2019 EBS Forms Migration API Beast practive

    14/57

  • 7/18/2019 EBS Forms Migration API Beast practive

    15/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1215

    Building Applications with

    Oracle E-Business Suite SDKfor Java: Best Practices

  • 7/18/2019 EBS Forms Migration API Beast practive

    16/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1216

    Development and Navigation

  • 7/18/2019 EBS Forms Migration API Beast practive

    17/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1217

    What JDeveloper Version to Use?

    Use JDeveloper 11g R1 Latest 11.1.1.6.0

    Oracle Fusion Middleware Stack Tooling

    Use JDeveloper 11g R2

    Latest 11.1.2.3.0

    ADF, Java EE specific

  • 7/18/2019 EBS Forms Migration API Beast practive

    18/57

  • 7/18/2019 EBS Forms Migration API Beast practive

    19/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1219

    Using AppsDataSource with JDeveloper

    Set up AppsDataSource in Oracle

    WebLogic Server.

    Follow MOS 974949.1.

    Create Application Server connection in

    JDeveloper

    Testing/Deploying Set Application Server -> Run to new

    connection.

    Generate EAR file and deploy via

    Enterprise Manager.

    Avoid connecting to APPS schema directly from JDeveloper

    E-Busines

    AppsDWebL

  • 7/18/2019 EBS Forms Migration API Beast practive

    20/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1220

    Navigation to ADF From Oracle E-Business

    External ADF server profile option:FND_EXTERNAL_ADF_URL

    Register ADF page as ADFX-type functions with

    WEB_HTML :

    GWY.jsp?targetPage=

    Put functions in EBS menus Oracle E-Business Suite Release 12.1.3 required

  • 7/18/2019 EBS Forms Migration API Beast practive

    21/57

  • 7/18/2019 EBS Forms Migration API Beast practive

    22/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1222

    UMX Roles

  • 7/18/2019 EBS Forms Migration API Beast practive

    23/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1223

    Using EBS UMX Roles with JAAS

    Most users have assigned responsibilities, but JAAS requirroles

    Want to avoid adding role directly for hundreds of users

    Create a UMX role, then add the role to a responsibility

    Be sure to add the responsibility name as the security context

    grant Use the UMX role for your ADF application

    Treat as enterprise role in ADF security

  • 7/18/2019 EBS Forms Migration API Beast practive

    24/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1224

    Using Session Management

    Feature with ADFApplications

  • 7/18/2019 EBS Forms Migration API Beast practive

    25/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1225

    Session Management FlowSession Management uses EBS login screen

    Log in

    to EBSADF Page

    Choose ADF

    Function from

    Responsibility

    ADF

    InitializeSession

  • 7/18/2019 EBS Forms Migration API Beast practive

    26/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1226

    ADF BC LayerADF UI Layer

    Application Module

    getEBSSession()

    Any calls to PL/SQL

    stored procedures

    Architecture of ADF with Session ManagYou need logic in both UI and ADF Model layers

    SDK

    EBiz object

    ICX Session

    Page

    MainPageContainerListener

    beforePhase()

    checkEBSSession()

    getAppModule()*setLocale()

  • 7/18/2019 EBS Forms Migration API Beast practive

    27/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1227

    Configuring ADF UI

    Log in

    to EBSADF Page

    Choose ADF

    Function from

    Responsibility

    ADF

    InitializeSession

  • 7/18/2019 EBS Forms Migration API Beast practive

    28/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1228

    ADF UI Artifacts Required

    Java file

    Custom control for ADF Lifecycle Execute business logic before page loa

    Establish session with E-Business Suite

    PagePhaseListener

    PageDef.xml file

    Registers custom phase listener

    Holds bindings for accessing business sPage Definition

    Holds the Application Server Node ID

    ADF Faces Application settingsWeb.xml

  • 7/18/2019 EBS Forms Migration API Beast practive

    29/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1229

    Create a Custom Phase Listener for ADF

    Java file ContainerListener

    Listener establishes EBS session before the page displays

    Implements PagePhaseListener

    Recommended: beforePhase(PagePhaseEvent pagePhaseEv

    If needed: afterPhase(PagePhaseEvent pagePhaseEvent)

    ADF UI Layer

  • 7/18/2019 EBS Forms Migration API Beast practive

    30/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1230

    Register Custom Phase Listener

    Register your listener at the single-page level in the pageDe

    globally in adf-settings.xml

    MainPageContainPageDef.xml example:

  • 7/18/2019 EBS Forms Migration API Beast practive

    31/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1231

    Custom Phase Listener

    public void beforePhase(PagePhaseEvent

    pagePhaseEvent) {

    checkEBSSession(pagePhaseEvent);

    setEBSLocale(pagePhaseEvent);

    }

    }

    beforePhase() example code

  • 7/18/2019 EBS Forms Migration API Beast practive

    32/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1232

    Initialize and check if valid EBS session

    get the application module

    get session from application module

    Redirect to EBS login page if needed

    Keeps EBS session alive

    checkEBSSession()

    Custom Phase Listener

  • 7/18/2019 EBS Forms Migration API Beast practive

    33/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1233

    Custom Page Listener

    Optional: Verify you are at certain phases before calling list

    Separate ADF application: make sure user has not logged out

    checkEBSSession() at every phase (not checking for particula

    OR

    ADF pages embedded in OA Framework pages: Improve perf

    checking only certain phases

    checkEBSSession(): check ADFLifecycle.INIT_CONTEXT_

    setEBSLocale(): check ADFLifecycle.PREPARE_RENDER

    Tip: Validating ADF life cycle phase

  • 7/18/2019 EBS Forms Migration API Beast practive

    34/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1234

    Custom Phase Listener

    getAppModule() in UI code follows ADF best practice of goi

    model layer to get application module instance

    public static ApplicationModule getAppModule() {

    BindingContext bctx = BindingContext.getCurrent(

    DCDataControl dc =

    bctx.findDataControl("[dcname]");

    ApplicationModule am =

    (ApplicationModule)dc.getDataProvider();

    return am;}

    [dcname] is the name of the application module in the .cpx

    DCDataControl dc = bctx.findDataControl("commonAMDataCo

    getAppModule() called by checkEBSSession()

  • 7/18/2019 EBS Forms Migration API Beast practive

    35/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1235

    Custom Phase Listener

    Get the EBS locale from the EBS session:

    if(sessionEBS != null)

    locale = sessionEBS.getLocale();

    Set the ADF locale with the EBS locale value:

    if(FacesContext.getCurrentInstance().getViewRoot(

    FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);

    setEBSLocale() on the UI

  • 7/18/2019 EBS Forms Migration API Beast practive

    36/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1236

    Configuring ADF Business Components

    Log in

    to EBSADF Page

    Choose ADF

    Function from

    Responsibility

    ADF

    Initialize

    Session

  • 7/18/2019 EBS Forms Migration API Beast practive

    37/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1237

    ADF Business Components Artifacts Req

    Code in AMImpl.java file

    Manages session against E-Business S

    Keeps one instance of EBiz object

    Implements data access methods Application business services entry poi

    ApplicationModule

  • 7/18/2019 EBS Forms Migration API Beast practive

    38/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1238

    ADF Business Components Layer: EBiz

    Getting EBiz instance in the application module

    Object representation of the Oracle E-Business Suite environm

    Holds information such as protocol, domain name, GUEST us

    database_id, Release 11i or R12, and so on

    Requires APPL_SERVER_ID and connection

    EBiz object needed for session management, profiles, messa

  • 7/18/2019 EBS Forms Migration API Beast practive

    39/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1239

    Accessing Node ID Information

    Avoid hard coding the APPL_SERVER_ID needed by EBiz

    Add a parameter to the applications web.xml:

    APPL_SERVER_ID

    B6EC2D561F631556E0437C2AD20A33A2

    5941920540894393938377354

    EBiz object requires APPL_SERVER_ID from desktop DBC f

  • 7/18/2019 EBS Forms Migration API Beast practive

    40/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1240

    Accessing Node ID Information

    When you need the APPL_SERVER_ID for the EBiz object

    ServletContext servContext =(ServletContext)ADFContext.getCurrent().getEnviro

    .getContext();

    String applServerID =

    servContext.getInitParameter("APPL_SERVER_ID");

    Access the parameter from your ADF Context

  • 7/18/2019 EBS Forms Migration API Beast practive

    41/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1241

    Accessing Node ID Information

    Administrator adds site-specific APPL_SERVER_ID value f

    desktop DBC file to plan.xml file upon deployment of applic

    Oracle WebLogic Server

    plan.xml value overrides value in web.xml

    Make the APPL_SERVER_ID deployment-specific

  • 7/18/2019 EBS Forms Migration API Beast practive

    42/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1242

    Put EBS PL/SQL Calls in Application Mod

    Typically need to initialize database session first

    Set up and call PL/SQL fnd_global.APPS_INITIALIZE

    Set up and call PL/SQL fnd_global.set_nls_context or use

    AppsSessionHelper.setNLSContext() from fndext.jar

    Set up and call the EBS PL/SQL APIs you need

    Initialize the ADF Business Components context

  • 7/18/2019 EBS Forms Migration API Beast practive

    43/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1244

    Embedding ADF Pages in

    OA Framework Pages

  • 7/18/2019 EBS Forms Migration API Beast practive

    44/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1245

    Embedding ADF Content in an OAF PageHybrid Page lets OAF fields coexist with ADF

    OAF M

    Other O

    such as

    ADF

    Rich Content

    Container in OAFE

    A

  • 7/18/2019 EBS Forms Migration API Beast practive

    45/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1246

    Embedding ADF in OA Framework PagesYou need two JDeveloper environments: ADF and OA Frame

    ADF

    JDeveEnviron

    OA FrJDeve

    Envir

    ADF

    E b ddi ADF i OA F k P

  • 7/18/2019 EBS Forms Migration API Beast practive

    46/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1247

    Embedding ADF in OA Framework Pages

    Build ADF page using JDeveloper 11g

    Deploy ADF application to external Oracle WebLogic Server

    Build OA Framework page using development environment

    corresponding to your EBS version 12.1.2 or later

    See OA Framework - How to find the correct version of JDev

    with eBusiness Suite 11i or Release 12.x (Doc ID 416708.1)

    Follow OA Framework development standards

    Deploy custom OA Framework application in EBS environmen

    You need two JDeveloper environments: ADF and OA Frame

  • 7/18/2019 EBS Forms Migration API Beast practive

    47/57

    E b ddi ADF i OA F k P

  • 7/18/2019 EBS Forms Migration API Beast practive

    48/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1249

    Embedding ADF in OA Framework Pages

    Set Type t

    ADF Func

    Register the ADF page as EBS function

    E b ddi ADF i OA F k P

  • 7/18/2019 EBS Forms Migration API Beast practive

    49/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1250

    Embedding ADF in OA Framework Pages

    Set HTML Cal

    GWY.jsp?tar

    faces/

    Register the ADF page as EBS function

  • 7/18/2019 EBS Forms Migration API Beast practive

    50/57

  • 7/18/2019 EBS Forms Migration API Beast practive

    51/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1252

    Resources

    Resources

  • 7/18/2019 EBS Forms Migration API Beast practive

    52/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1253

    Resources

    Oracle E-Business Suite Software Development Kit for Jav

    Oracle Support Doc ID 974949.1)

    Oracle E-Business Suite System Administrator's Guide S

    See Oracle Application Framework Documentation Resources, R

    (Doc ID 391554.1)

    See OA Framework - How to find the correct version of JDevelop

    eBusiness Suite 11i or Release 12.x (Doc ID 416708.1)

    ADF blogs

    E Business Suite Technology Stack Blog

  • 7/18/2019 EBS Forms Migration API Beast practive

    53/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1254

    E-Business Suite Technology Stack Blog

    Direct from EBS Develo

    Latest EBS techstack n

    Certification announce

    Primers, FAQs, tips

    Desupport reminders

    Latest upgrade recomm

    Statements of Direction

    Early Adopter Program

    Subscribe via emailor

    blogs.oracle.com/stev

    ADF Adventures Blog

  • 7/18/2019 EBS Forms Migration API Beast practive

    54/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1255

    ADF Adventures Blog

    ADF Development for E

    Sample Code

    Videos

    References

    Other ADF related topic

    Subscribe via emailor

    blogs.oracle.com/jruiz

  • 7/18/2019 EBS Forms Migration API Beast practive

    55/57

  • 7/18/2019 EBS Forms Migration API Beast practive

    56/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1257

  • 7/18/2019 EBS Forms Migration API Beast practive

    57/57

    Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1258