Wednesday, September 13, 2017

[ORACLE ADF INTEGRATION - PART 1] Integrating Oracle ADF with Fusion suite of products and third party applications




Integrating Oracle ADF with Fusion suite of products and third party applications

This series of blog posts will focus on how well Oracle ADF can integrate with other products/systems.
Oracle ADF is an end-to-end Java EE framework that simplifies application development by providing out-of-the-box infrastructure services and a visual and declarative development experience.
In today's world, there is none to be developed from scratch as we all know, as there are existing applications or solutions and any new solution should be capable enough to reuse or integrate to those existing solutions. Oracle ADF promotes high re-usability and integration.

Oracle ADF can be integrated using out of box capabilities with various oracle products. Here is a overview of the integration possibilities:




1. Oracle ADF integration with Oracle BPM

Oracle BPM is the business process management product which deals with business flow and user interaction activities. Human Task Activity which needs user interaction is fulfilled by Oracle ADF user interfaces.

Mapping is done at the ADF task flow level for each human task.
2. Oracle ADF integration with Oracle SOA Suite using Web Services (SOAP)

Oracle SOA Suite exposes its functionality as Web Services potentially BPEL endpoints which can be consumed by Oracle ADF using Web Service Data Controls or Web Service Proxies.


3. Oracle ADF integration with Third Party Applications using Web Services (REST or SOAP)

Any third party application does not matter which technology (Java, .NET etc) can be exposed as SOAP/REST service and can be consumed by Oracle ADF using Web Service Data Controls or Web Service Proxies.
In fact Oracle ADF Business Components(EO/VO/AM) can be exposed as SOAP/REST services and can be consumed in other ADF or third party applications.

Social Media applications like Facebook, Twitter, LinkedIn provides services or API to be integrated. Oracle ADF can use the provided interface and be integrated with these social apps.

4. Oracle ADF integration with Oracle Web Center

In object oriented terms, Oracle Web Center extends Oracle ADF.
Web Center is a portal framework. Its capability is to use re-use existing user interfaces and interlace them with ADF task flows. 
Web Center exposes different applications as portlets. We need to prepare ADF or JSF based Application as a portlet and configure/deploy them using WSRP (Web Services for Remote Portlets). 

5. Oracle ADF integration with E Business Suite R12.1.3 (Forms application)

Usually all the extensions or customizations would be done in OAF for EBS R12.1.3. But If you are planning a stand alone application, not requiring the tight integration provided with OAF, ADF would be an excellent choice.

There are two scenarios here:
1. Customization or Personalization - Here existing EBS pages or forms need to be modified using OAF.
OAF is a MVC framework and fully oriented towards EBS application development.
OAF uses UIX and BC4J technologies.

2. Extensions or New User Interfaces: Use Oracle ADF.
Existing OAF/EBS Application will redirect to ADF application by setting below parameters in EBS.
Set the profile value of FND_EXTERNAL_ADF_URL to ADF Application context URL.
Create a function using ADFX function type and set the HTML call appropriately to the specific ADF page.
Assign EBS Security to the above created function.

There is a lot of information about when to and when not to use Oracle ADF in the context of EBS.

6. Oracle ADF extending Fusion Application (12c).
This is more of ADF development as Fusion Applications are developing using Oracle ADF framework. The only difference could be the pages inside Fusion Applications will be using Fusion datasources, but rest all will be the same environment as in any other ADF Application.


7. Oracle ADF integration with OBIEE

After adding JDeveloper extensions (links provided in references section) specific to OBIEE, we should be able to create a "BI Presentation Services" connection in JDeveloper.
Once connection is available, you will be able to see all Reports, Dashboards available. Just Drag n Drop into your ADF Page to show OBIEE reports in ADF Application.

JDeveloper OBIEE extensions provides xml tags specific to OBIEE like adfbi

Alternative, old approach is to add a "iframe" in ADF Page and include OBIEE report URL

Trade off using "iframe" is layout issues.

8. Oracle ADF integration with Oracle BAM using BAM Data Controls.

Same as #7, we should be able create a BAM connection and access BAM reports.

Alternative, old approach is to add a "iframe" in ADF Page and include BAM report URL
Trade off using "iframe" is layout issues.

9. Oracle ADF integration with PL/SQL procedures. (Backend integration).

Easiest way is to use callable statements to invoke SQL statements.
Best Practice would be to create a web service on top of PL/SQL procedure and consume the service in ADF Application.
Always use binding layer to invoke a PL/SQL function and use Wrapper to wrap up your PL/SQL invocation calls for better abstraction and maintenance.

References:
Latest JDeveloper release 12.2.1.3 & JDeveloper extensions available below

Acronyms:
EBS - Enterprise Business Suite application.
OAF - Oracle Application Framework
UIX - User Interface XML
BC4J - Business Components for Java.
BAM - Business Activity Monitoring
ADF - Application Development Framework
ADF BC - Business Components
BI  - Business Intelligence



In the upcoming posts, I would talk about these integrations in detail.


Sunday, June 5, 2016

My First Oracle JET Sample Application

Though I am practicing Fusion Middleware technologies from a long time, wondered if Oracle JET is something I can give a shot quickly as the buzz is moving towards cloud these days.

Below links helped me a lot to quick start Oracle JET and learn some basic stuff. I was able to create a sample application with JET Module and KnockOut Module.

Here are the links

Tutorial to develop a sample application:
https://netbeans.org/kb/docs/webclient/ojet-gettingstarted.html

Oracle JET components
http://www.oracle.com/webfolder/technetwork/jet/uiComponents-formControls.html

In my next post, will try to create a sample application using REST based UI.

Tuesday, May 24, 2016

Application Deployment Fails in Oracle Weblogic

When I deployed an ADF Application using Enterprise Manager in Oracle Weblogic server, weblogic complains "File not uploaded. Use the Browse button to locate the file of the archive on your disk".

Apparently this seems to be because of no space in weblogic or middleware home. I did try deleting logs and files under tmp after reading some blogs as I do normally.

But the trick which solved this issue in my case is delete "appmergegen" folders which are hidden and I cant see from putty. appmergegen folders are located under /tmp folder of admin server.

Monday, May 9, 2016

Groovy exception oracle.jbo.ExprSecurityException: JBO-25151


ADF BC 12.2.1.0

I was trying to run ADF BC after using groovy expression for one of the transient attributes and found that JBO-25151 in the stack trace error logs.

Resolution for this is to make the transient attribute expression TrustMode="trusted" instead of "untrusted".

Friday, April 22, 2016

Cleared Oracle ADF 12c Certification



Its been 3 years now that I cleared Oracle ADF 11g certification (1Z0-554), so I thought its high time to clear 12c as well and cleared Oracle Application Development Framework 12c Certified Implementation Specialist(1Z0-419)

Here I am to share my learning path.
Frankly I have not read any new books particularly for this exam.
But for ADF 11g exam, I did read Oracle ADF Real World Developer's Guide by Jobinesh
But I suggest to gain in depth knowledge of  ADF BC 12c new features which are very much required for this exam.

Overall exam covered each and every topic mentioned in the exam topics. I feel more preference is given to ADF BC validations and ADF Life Cycle.

Interesting observations I made during the 12c exam compared to 11g exam were:
Questions about Mobile Application Framework, like compatibility.
Definitely time allotted is not enough. May be I should have managed time well.
More in depth questions about pros of ADF over traditional JSF

Also, coolest way to have all your certifications at one place is to use Acclaim. Here, I started adding my certifications

https://www.youracclaim.com/badges/14cbde0f-78c3-4e8c-9df1-9fb489a09755

References:
http://www.oracle.com/technetwork/developer-tools/jdev/learnmore/index.html

Thursday, March 17, 2016

Oracle Help for Web 12.2.1.0 (OHW)

We are trying to integrate our Oracle ADF/BPM/SOA Application with Oracle Help For Web 12c version.

Starting point is to download ohw-rcf-demo-thin.ear from the below location
http://www.oracle.com/technetwork/developer-tools/help/utilsoft-ohw-422139.html

Once deployed to weblogic domain which already has adf libraries installed on the managed server, you can reach out to the help application with the below URL

http://hostname:port/ohw-rcf-demo/help

You should see Oracle Help 12c
jdevadf.oracle.com/ohw-rcf-demo/help

Oracle 12c documentation reference:
http://docs.oracle.com/middleware/1221/jdev/develop-help/orahelp-about.htm#OHJWG111

I will post more how to customize and add help contents.

Tuesday, March 15, 2016

ViewExpiredException when launching bounded task flow




javax.faces.application.ViewExpiredException: viewId:/child-flow/testme - ADF_FACES-30107:The view state of the page has expired. Reload the page


Problem Summary
---------------------------------------------------
launch bounded task flow in external window but action not working [only in IE]

Problem Description
---------------------------------------------------

JDEV 12.2.1 & IE 11/Firefox 43.0.3


Use case : Trying to launch bounded task flow with pages in external-window using task-flow-call activity from another task flow.

Settings on the task flow call activity - Run As Dialog to true and Display-Type : external-window.



Problem: Click on any action button below exception occurs.

This issue is not seen in Firefox.



Surprisingly, if i use inline popup instead of external-window to launch the taskflow no issues is seen. Works good in both IE and Firefox.




I raised an Oracle SR to find out that adding prettyUrl options in web.xml will fix this issue in IE.




oracle.adf.view.rich.prettyUrl.OPTIONS
off


-- or --


oracle.adf.view.rich.prettyUrl.OPTIONS
useHistoryApi






Tuesday, February 23, 2016

Deploying ADF Fusion Web Application to StandAlone Weblogic Server


Common issues while deploying adf web application to standalone server in 12c.

Problem while deploying Oracle ADF application - java.lang.ClassNotFoundException: oracle.adf.model.servlet.ADFBindingFilter 
http://www.albinsblog.com/2012/08/problem-while-deploying-adf-application.html#.VsysTFKaIs1

Caused by: weblogic.common.ResourceException: DataSource XXX_XXXXX already exists

Caused by: java.lang.ClassNotFoundException: oracle.bc4j.mbean.BC4JConfigLifeCycleCallBack

Thursday, February 18, 2016

af:target throws NotSerializableException


JDEV 12.2.1.0

I am seeing below exception when I started using af:target tag in one of my projects. Surprisingly one project works good and other fails with below exceptions.

javax.faces.FacesException: oracle.adf.view.rich.event.Target
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1237)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeRenderResponse(LifecycleImpl.java:1040)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:332)

Caused By: java.io.NotSerializableException: oracle.adf.view.rich.event.Target
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        at java.util.ArrayList.writeObject(ArrayList.java:762)
        at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)


I did googled around and found the below blog, but turning on/off, removing the parameter also did not help.
https://mhjmaas.wordpress.com/2014/12/17/adf-12c-target-tag-not-working-zip_state_failed/


As I mentioned in the my post,
Project 1 (ADF Application) - ADF Project is working fine as there is nothing in web.xml which is asking af:target to serialize.
Project 2 (BPM Appliclation with ADF Screens embedded) - But the same screen (adf library jar) when embedded in BPM UI (which has human tasks) Project is throwing NotSerializable exception.


Finally after making the below changes in BPM Project, af:target works good without exceptions.


        "all": stores all state in the client in a (potentially large) hidden form field. This matches the default behavior of the JSF reference implementation, and can be useful for developers avoiding any use of HttpSession.
                "token": (Default) Stores the page state in the session, but persists a token to the client. The simple token, which identifies a block of state stored back on the HttpSession object, is stored on the client. This enables ADF Faces to disambiguate the same page appearing multiple times. Failover is supported.
       
        org.apache.myfaces.trinidad.CLIENT_STATE_METHOD
        token
   


        org.apache.myfaces.trinidad.COMPRESS_VIEW_STATE
        false
 
Oracle Reference : https://docs.oracle.com/cd/E26098_01/web.1112/e16181/ap_config.htm#ADFUI579 
OTN # https://community.oracle.com/message/13694299#13694299

Tuesday, January 12, 2016

ViewExpiredException The view state of the page has expired



I was facing below exception when task flows are nested. Loading one task flow within another task flow causes below exception

javax.faces.application.ViewExpiredException: viewId:
The view state of the page has expired.  Reload the page.

Add CLIENT_STATE_MAX_TOKENS in the application web.xml. Make sure the token count is sufficient based on your application.

 
    CLIENT_STATE_MAX_TOKENS
    15
 

Monday, December 28, 2015

Oracle ADF 12c Observations


We have recently migrated our Oracle ADF BPM Application developed in 11.1.1.7 to 12.2.1.

Here with I would mentioned some of the findings during the 12c migration

First of all I would mention some of the components which are deprecated and had to fix immediately.

Oracle Adaptive Case Management ACM



Oracle Adaptive Case management feature is a very good extension of Oracle BPM which suits for the adaptive process model.

Below blogs talk more about the out of box and custom approaches to implement Oracle ACM

Oracle BPM : Case Management API's

https://blogs.oracle.com/VenugopalMangipudi/entry/obpm_case_management_api_s


https://blogs.oracle.com/VenugopalMangipudi/entry/obpm_case_management_api_s1

Adaptive Case Management 12c and ADF Human Tasks


http://andrejusb.blogspot.gr/2014/12/adaptive-case-management-12c-and-adf.html

Monday, June 1, 2015

How to solve oracle.jbo.ConfigException: JBO-33001: Configuration file /model/common/bc4j.xcfg is not found in the classpath.


I am seeing this error when trying to run the application module of my model project in the local environment. It used to work fine sometime back and suddenly started seeing the below exception.

(oracle.jbo.ConfigException) JBO-33001: Configuration file /tester.xcfg is not found in the classpath.
----- Level 1: Detail 0 -----
(oracle.adf.share.ADFShareException) Error encountered while creating the MDS Session. Application state will be reset. Please logout and log back in if problem persists.





As there is parallel development going on with in the team, lot of additions are done to the project files.
This error is due to the addition of MDS capability.

In order to solve this error, disable MDS in adf-config.xml. Comment out content and run the application module

Wednesday, May 27, 2015

ADF Application Deployment Issue : ConverterELTag ClassNotFoundException




Here is an exception I was getting while deploying an ADF Application to local standalone weblogic server.



Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: 'emrp'
Caused by: java.lang.ClassNotFoundException: javax.faces.webapp.ConverterELTag



Solution:

After sometime of debugging, I found that the Model Project with in the ADF Application has got an invalid library reference to ADF Faces Databinding Runtime Library which is not supposed to be present in Model Project. Instead ADF Faces is something related to ADF View Project.

I just removed that reference and redeployed the application to the standalone weblogic server in my local machine.

Remove ADF Faces Databinding Runtime Library from ADF Model Project : Issue is resolved.

Tuesday, May 5, 2015

Deploying Oracle ACM Case Data Project


Are you trying to deploy the out of box Oracle ADF UI/Forms project generated using Oracle Case Data ? Then this is for you.

Today, while working on Oracle Adaptive Case Management auto generated forms based on case data, I faced below issues and here are the resolutions. 



Environment : Using BPM version 11.1.1.7.0 and installed the pre-requisite patch 18609527
 
1) ClassNotFound Exception CaseFormServlet

After embedding the Case Data UI Project's WAR file into an Application EAR Profile - Tried to deploy the EAR into Standalone SOA/BPM Server.

Below error is seen
java.lang.ClassNotFoundException: oracle.bpm.casemgmt.client.forms.servlet.CaseFormServlet

which implies that the CaseFormServlet class file is missing. 

Add below jar files to the Case UI Project to resolve the Class Not Found Exception.
Find the jar files either in JDEV_HOME/jdeveloper/soa/modules/ or extract the above patch to find.

oracle.bpm.casemgmt.implementation.jar oracle.bpm.casemgmt.interface.jar


 2) Again, if we try to deploy the EAR file now we see a different error saying " pre loading CaseFormServlet" failed. This is more of a weblogic server specific issue.

To resolve
Open web.xml -> Servlets -> CaseFormServlet --> Make sure you have Load Servlet on First Request instead of Application Start.


Environment : Using BPM version 11.1.1.7.0 and installed the pre-requisite patch 18609527

After resolving the above issues, I am able to successfully deploy the generated UI to Standalone Server.

Tuesday, April 14, 2015

MDS-01330: unable to load MDS configuration document


Following deployment error is seen in some cases when MDS configuration is incorrect

Error: oracle.fabric.common.FabricException: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document   
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage is invalid.   
MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.   
MDS-00003: error connecting to the database   
Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.sql.SQLException: ORA-01017: invalid username/password; logon denied

: MDS-01330: unable to load MDS configuration document   
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage  is invalid.   
MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.   
MDS-00003: error connecting to the database   
Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.sql.SQLException: ORA-01017: invalid username/password; logon denied

Validate adf-config.xml if the MDS entries are proper and try to deploy again.

Oracle SOA MDS Account Locked



Today, when tried to deploy a composite to standalone SOA Server from JDeveloper, I ran into the below issue.

JDeveloper stopped listing my SOA Server in the deploy wizard. Reason is SOA_MDS Schema password is expired. To find this out, I validated the data source connection in Weblogic Console.

I followed below steps to bring up the SOA Server and deploy my composite successfully.

The DBMS driver exception was: ORA-28000: the account is locked 

Change Password and Unlock the MDS account
ALTER USER username IDENTIFIED BY new-password;
ALTER USER username ACCOUNT UNLOCK;

Validate if data source connection works fine in Weblogic Console and then restart SOA Server.

Wednesday, April 1, 2015

Mockups in Oracle ADF


Every UI designer will be familiar with the word MockUps. This is the first cut to the customer while proposing a application which can be a Stand alone or Web or Mobile Application.

Below are different ways to develop mockups.
  • Place holder Data Control - Static Data
             Oracle ADF provides an in built approach using Placeholder Data Control to support Mockups.
             Below are easy references to the mockup development using place holder data control            
             https://blogs.oracle.com/jdeveloperpm/entry/options_for_creating_poc_mockups_in_adf

             Note that the placeholder data control is meant to help you design the page visually - not 
             to actually achieve functionality in the page.
             For that you'll need to actually build the application.

  •  Microsoft Visio Stencils provided by Oracle
             You may also develop the mockups using Microsoft Visio Stencils provided by Oracle 
              out of JDeveloper as pointed out below pretty quickly

              Download ADF_Faces_Stencils_for_Visio.zip from below link
              http://www.oracle.com/technetwork/indexes/samplecode/jdeveloper-adf-sample-522118.html


              Below links explain how to develop mockups using Stencils provided by Oracle
              http://lucbors.blogspot.com/2011/03/adf-11g-ui-designer-meets-adf-developer.html

             https://blogs.oracle.com/jdeveloperpm/entry/adf_faces_stencils_for_visio_available_on_samplecode
 


Monday, March 30, 2015

Oracle ADF Table FeaturesOff Property


Oracle ADF Table comes with lot of out of box features which can be hidden using featuresoff property of Oracle adf table.

Almost all the combinations are explained in detail here

https://blogs.oracle.com/aramamoo/entry/what_does_featureoff_attribute_do