Thursday, February 24, 2011

Beware of Hackers - Keep ADF Task Flows inside WEB-INF

While doing reviews for ADF projects, time to time I can see developers decide to store ADF Task Flows outside WEB-INF folder, directly under Public HTML directory. This is driven by better structuring approach, developers want to see ADF Task Flows next to JSF Fragments or Pages inside application structure. However, security aspect is forgotten - ADF Task Flow is XML file and if it will reside outside WEB-INF folder, it will be directly accessible from the user browser. Then someone will be able to download XML source code for all ADF Task Flows and read your Controller definition.

Download sample application, where we have one ADF Task Flow outside WEB-INF and one inside: TaskFlowWebInfAccess.zip. Both ADF Task Flows are based on fragments and are rendered as regions:


From the application structure view, we can see that jobs-flow-two ADF Task Flow is outside WEB-INF folder:


This ADF Task Flow implements Train wizard steps:


Because we have it outside WEB-INF folder, its directly accessible by app-context-root/flows/jobs-flow-two.xml:


If you want to sleep well, always keep ADF Task Flows inside WEB-INF folder ! :)

Monday, February 21, 2011

WebCenter PS3 Customization Manager- Long Awaited Feature for MDS

There are really great news for those of you, who are working on MDS personalization and customization support in Oracle Fusion Middleware applications. What we were really missing before Oracle Fusion Middleware 11g PS3, was some kind of MDS explorer to browse through customized data (addressed in my previous post). Now with PS3, such tool is available - Customization Manager. Granularity level goes to the pages, fragments and task flows - we can see customized objects, download/upload/delete/promote metadata. It would be nice to see what changes are applied inside each file, compare with previous versions, merge and patch. We expect to see this in future releases.

Customization Manager is available through WebCenter Composer (you should enable it inside adf-config.xml):


User can search for site resource and manage customizations:


Enable Customization Manager inside adf-config.xml:


This post is just a quick preview, I will share detail technical samples in my future posts - stay tuned !

Sunday, February 20, 2011

BPM Portal 11g PS3 - How To Configure Oracle BPM 11g PS3 Process Portal on Oracle WebCenter Spaces 11g PS3

If you are working with Oracle BPM 11g and Oracle WebCenter 11g technologies, definitely you will be interested to join these two together and create enterprise portal. Such integration became available with Oracle Fusion Middleware 11g PS2 release during the last year, see technical steps to make this integration work - BPM Portal - How To Configure Oracle BPM 11g Process Portal on Oracle WebCenter Spaces 11g. With Oracle Fusion Middleware 11g PS3 being released few weeks ago, there are some changes in this area - mainly configuration part, overall features are still the same as in PS2. In PS3, they moved all Oracle BPM process portal related content into WebCenter domain, before it was in SOA domain. However, build script and properties file still remains in SOA domain. Its very important now, to setup UCM and WebCenter Discussions services properly - otherwise BPM and WebCenter mapping process will fail, it was not so critical in PS2.

Ok, let's start from the beginning. You need to complete two steps described below, before you will run BPM and WebCenter integration script as per documentation (5.5.2 Enabling Process Spaces in a WebCenter Domain). For Oracle BPM and WebCenter integration in PS3, you still can reference blog mentioned above for PS2. There are few extra steps specific for PS3, I will explain these now.

First Step - Oracle BPM Spaces:

First of all, follow instructions from documentation - 5.5.2 Enabling Process Spaces in a WebCenter Domain. Step one says to extend WebCenter domain with Oracle BPM Spaces product, however this product is not on the list there in the wizard (even documentation says it should be there). In order to extend WebCenter domain with Oracle BPM, do the following - run config.sh from WebCenter domain:


Choose to extend an existing WebLogic domain:


Extend WebCenter domain:


As you can see, there is no Oracle BPM Spaces product available on the list. But, we can extend domain using extension template - select Oracle BPM Spaces extension template:


You can find this template inside WebCenter domain, common folder:


Now WebCenter domain will be extended with Oracle BPM Spaces product.

Second Step - UCM:

Keep in mind, after you will install Oracle UCM, there is no folder support by default - need to enable it. Login into Oracle Content Server console and select Admin Server:


From Oracle Content Server Admin console, select Folders option - this will list all supported folder features:


Make sure Folders_g feature is selected, this will enable folders support in UCM:


Now select Integration group:


Make sure WebCenterConfigure feature is set - otherwise will get exceptions when extending and mapping WebCenter with BPM:


Restart UCM server, you should see Contribution Folders available now in UCM:


We need to define UCM RIDC port and IP address filtering, this can be done through Oracle Enterprise Manager:


I decided to set UCM RIDC port to 7777 and allow access to all IP's *.*.*.*. You are free to choose your setting here.

We are done with the second step now.

Make sure UCM and WebCenter Discussions properties are set correctly. For example, for my environment:

#content server details
wcContentServerName=127.0.0.1
wcContentServerPort=7777 (UCM RIDC port)
wcContentSpacesRoot=/ProcessSpaces (UCM folder for BPM Process Portal)
wcContentAdminUser=weblogic (UCM admin user)


#discussion server details
wcDiscussionServerUrl=http://127.0.0.1:8890/owc_discussions
wcDiscussionAdminUser=weblogic

Here we go - bazinga! :), Process Workspace appears inside WebCenter Spaces 11g PS3. I have customized default Process Workspace view to demonstrate all powerful features - created new pages, changed components order, etc.:


Process Tracking view:


Process Calendar view:


Mash-up Task Flow that brings Employees list:


We can browse UCM repository content and read PDF documents:


Collaborate on internal forums - WebCenter Discussions:


Integrate external sites and applications:


Friday, February 18, 2011

ADF Faces PopUp 11g PS3 Performance Improvements

I'm sure you already noticed better JDev/ADF 11g PS3 performance comparing to previous releases - ADF 11g PS3 Runtime Performance 2-3 Times Faster vs. ADF 11g PS2. Blog reader was asking, what works faster - to open ADF Faces popup using Java Script or through RichPopup API, using show(PopupHints) method. There is no better way, as just to try it.

Download sample application - ChoiceListLOVPerformance3.zip, this sample implements both methods for popup opening.

If we test with JDev/ADF 11g PS2, it takes around 1 second to open ADF Faces popup:


Now, will test the same on JDev/ADF 11g PS3, will open ADF Faces popup through Java Script from managed bean:


Now it opens much faster on PS3, around 400 milliseconds:


Let's try to open ADF Faces popup without using Java Script, but through RichPopup API (on PS3):


This method allows to open ADF Faces popup record fast, just around 250 milliseconds:


Sunday, February 13, 2011

ADF Region Communication - Region Refresh Through Contextual Event

I will extend previous sample application - ADF Region Communication - Data Exchange Through Shared Data Control Java Class and will describe how you can enrich it and apply contextual events. Even you would think about contextual events as about something cool, be careful - its not a panacea for all problems, and should be used carefully to avoid system architecture complexity explosion. While its not always true, I would prefer to use contextual events mostly for dependent region refresh, without passing payload directly. When system grows, its easier to track data references from Data Control Java class (see referenced blog post above), than contextual events payload variables. Its possible to refresh dependent region through ADF bounded task flow parameters - but contextual events provide better separation level between two regions.

Download sample application - ADFRegionCommunication2.zip. Two regions are implemented - Jobs and Employees:


Based on user selection, second region is refreshed - rows for selected job are highlighted:


If selection is changed, dependent region is refreshed as well:


As in previous blog article referenced above, user can insert new row - CreateWithParams operation will get JobId selected from the first region:


JobId data is passed as before, through Data Control Java class. Region is being refreshed through contextual event. This event (jobIdSelectionEvent) is generated on row selection and is triggered from table selection listener method:


Event (jobIdSelectionEvent) is declared in page definition file for Jobs region:


Main page provides contextual event mapping between two regions - producer (headerflow1) and consumer (detailflow1):


Finally consumer region assigns contextual event to be handled by refreshDetailTable method:


This method is coming from managed bean associated with consumer region:


In order to be able to map this method from consumer region page definition, you need to create Data Control for managed bean class:


It is good practice to generate Data Control for managed bean from early beginning, while there are ADF classes declared yet. Otherwise generated Data Control will include attributes from ADF classes and will be unnecessary big. There is no option to deselect class objects from being included into Data Control.

Row color is controller by expression language, we are referencing Data Control Java class to retrieve current selection from header region and compare it with each row value from detail region:

Friday, February 11, 2011

How to Retrieve ADF Select Many Shuttle Selection

ADF Faces provides long list of rich UI components. One of them shuttle component, it allows to create shuttle type multi-selection lists out of the box. We were looking how to access shuttled items programmatically, didn't found any proper info on the Web - decided to contribute to community with one more hint. If you will read ADF Faces developer guide, there is a suggestion to use ADFShuttleUtils Java Script object in order to access shuttle items. This means you would need to implement af:clientListener for Java Script invocation and so on, but I'm not a big fan of using Java Script for such scenarios. Let's find easier and better solution.

Download sample application - ShuttleAccessApp.zip. This simple application implements ADF Select Many Shuttle and provides managed bean methods to operate this component:


You only need to specify Base and Display attributes, then ADF Select Many Shuttle is defined:


List binding - DepartmentsView1, will be defined inside Page Definition file - we will use this binding to access shuttled elements from managed bean:


Here is the most interesting part, instead of using Java Script API, you can simply get the list binding inside managed bean and iterate through shuttled items:


It could be common requirement to clean shuttled items with external button, we can achieve this by clearing selected indices:


Shuttle some items and press Process Selection button:


We access shuttled items from managed bean:


Press Clear Selection button to remove shuttled element, this will clean shuttle programmatically: