Friday, September 28, 2012

Oracle OpenWorld 2012 is about to start - very exciting. I would like to share info about sessions I will be speaking on this year. I have finalized technical content for both sessions, all technical demo applications are ready to rock.

Integration points for ADF/BPM will be presented in this session. You will see a technical demo about how to customize standard Oracle BPM Worklist Task Flow using MDS Seeded Customization. I will present approach to create lightweight ADF UI to display information from Oracle BPM engine using BPM Java API. Generic Task Handler technical prototype will be explained.

My colleague - Danilo Schmiedel will be speaking on this session, he will present BPM best practices.

Tuesday, September 25, 2012

Finally we have express ADF edition - ADF Essentials, free to use even for production deployment. It includes most of the important ADF features, except ADF Security (this can be implemented with standard Java security). We were discussing idea of express ADF edition on ACE Directors briefings already two years back and Sten Vesterli was one of the strongest advocates for ADF Essentials.

There is lots of hype about free ADF edition, but only time will show how successful it will be. Currently most of the Oracle customers already have WebLogic licenses, so it makes more sense to use full ADF version and avoid sometimes painful ADF setup, configuration and runtime performance monitoring for serious production systems. On the other hand, lighter ADF edition also makes its own sense - we can have much more ADF deployments across enterprise with lower cost.

This post is just a quick review for ADF Essentials on Glassfish. I will do proper performance test soon to compare ADF performance on WebLogic vs. Glassfish. So far, it seems like runtime ADF performance on Glassfish is pretty good, may be because lighter server. I will need to verify how good it scales and how well it works under stress load.

Download sample application for this post - adfessentialstest.zip. This application contains two JDeveloper 11.1.2.3 applications - one main application, another ADF library. I would like to test if ADF region imported from ADF library works. Sample application was deployed to Glassfish server based on instructions from Shay Schmeltzer - Deploying Oracle ADF Essentials Applications to Glassfish.

Main application is up and running on Glassfish server:

There is ADF Library JAR file included into Main application, it contains ADF region:

Main application contains single page with two tabs, imported region is in second tab. First tab contains Master-Detail implementation:

Application is pretty simple, but first thing I noticed WAR deployment archive size - around 60 MB, lots of ADF libraries are packaged into WAR. No wonder Glassfish server goes out of memory after couple of redeployments. ADF Essentials are deployed into Glassfish domain LIB folder, in addition different ADF libraries are included into WAR package as well. In order to decrease WAR size a bit, we can enable compression option (it allows to decrease WAR size by around 15 MB in this case):

Compressed WAR size is 44 MB:

List of ADF libraries in deployment WAR file:

ADF runtime performance on Glassfish was quite good, it looked to me even a bit faster comparing to WebLogic - but I could verify this only after JMeter stress test. Master-Detail data was loading pretty fast:

Important: I have tested the same application on WebLogic server with full ADF - the same imported ADF region from ADF library was rendering correctly. ADF library support formally is available in ADF Essentials, this means we are hitting some bug here.This proves that there are runtime differences between ADF application running on full ADF and on ADF Essentials. If application runs on full ADF, it doesn't mean it will run on ADF Essentials, it will require additional testing.

UPDATE 26/09/2012: ADF region imported from ADF library works. I did one more redeployment for the main application on Glassfish server - suddenly it works now. I can see ADF region rendered from ADF library:

Probably some parameter was not registered correctly during initial deployment.

Monday, September 24, 2012

Preparing my schedule for OOW. Lots of ADF technical content this year, also very strong focus on ADF Mobile - I feel it will be very interesting conference with lots of networking and chatting about ADF.

Friday, September 21, 2012

I bet every ADF developer was wondering in his life at least once - what operation to use to insert new row into ADF table - Create or CreateInsert. This one is a must question from developer who starts ADF development. Answer - use CreateInsert operation to insert new rows into ADF table or form. Create operation works with form component only. However, this is not so obvious - I saw such situations when developers where stuck for some time, because they were unable to implement new row insertion (just because of using Create, instead of CreateInsert). It looks like CreateInsert operation calls additional functionality to push newly created record and really display it in ADF table just after operation is completed. But Create operation is missing that part. I will describe in this post with example.

There is only one page, where I have both ADF form and table. Same Create and CreateInsert operations are applied for both blocks:

Operations are defined in Page Definition file:

Firstly we test Create operation - press Create button for the table:

There is no new row rendered in the table, but new row was inserted only into form component - this is a problem most of new ADF developers are facing. User gets confused - press second time on Create and ADF will show validation errors for missing required fields in the form:

CreateInsert operation behaves much better - press CreateInsert button and you will see new blank row inserted into ADF table. User is ready to type data and commit it. Also new row was inserted into form component - this means CreateInsert works for form and table:

Saturday, September 15, 2012

When building custom ADF applications, where special system access is required - application configuration, monitoring and etc. screens - we want to grant access only to the system administrator. Often to the same administrator, who can access and manage WebLogic instance, typically - weblogic user from Administrators group. This user belongs to Administrators group defined in WebLogic domain by default. I will describe in this post, how to configure this group (same method can be applied for other default groups from WebLogic) with ADF Security for custom ADF application.

Download working sample application with restricted access only for WebLogic administrators - WLSAdminSampleApp.zip.

This role is custom one, we will map it with Administrators role from WebLogic.

Now is the main trick - we can't map our custom RedSamuraiAdmin Application Role with system Administrators role from WebLogic using jazn-data.xml wizard. We can do it manually in jazn-data.xml source directly. When Enterprise Role is mapped with Application Role through the wizard, one security class is assigned:

oracle.security.jps.internal.core.principals.JpsXmlEnterpriseRoleImpl

But Administrators group from WebLogic belongs to different security class:

weblogic.security.principal.WLSGroupImpl

This means we need to fix correct class name manually in the source of jazn-data.xml:

Once correct role mapping is fixed, we can assign security permission to protected resource in ADF application, main page in this case (main page is granted view access for RedSamuraiAdmin role, this role in turn is mapped with WebLogic Administrators group):

You can test provided sample application with WebLogic admin user:

Protected page will be accessed:

You will receive error, if will test with default security class assigned by the wizard:

This webinar will cover advanced ADF areas, agenda will be pretty packed. Mainly I will focus around these 7 topics (some of them I may skip, depending on available time) - typical bugs, fixes, workarounds and best practices:

Sunday, September 9, 2012

You know sometimes its a challenge to get correct behavior for ADF editable table - meaning, to have it as much as possible aligned with smooth user experiences. One of the challenges to control when validation rules are fired - often validation is fired too early or too often (same validation error messages are repeated multiple times). In some cases this can be resolved by setting Change Event Policy = None on iterator (default is Auto PPR), but still this doesn't cover all scenarios. There is special case when ADF editable table is set to support multi-selection. With multi-selection enabled, even setting Change Event Policy to None doesn't help - validation is still fired too early. But there is solution - set Immediate property to True for ADF editable table component - this will allow to skip annoying validation messages when editing data. Validation failure messages will show up on transaction commit - invalid fields will be highlighted in red.

Download test case application, where Immediate property is set to True - AutoPPRApp.zip.

As soon as new row is inserted, all values are blank and user needs to type something. User moves mouse cursos to any of the fields from new row - immediately validation fires without reason for empty required fields (this is way too early - user was about to type something, ADF throws validation error in advance):

Thursday, September 6, 2012

Sometimes it can be a bit frustrating - small fix can resolve serios problem. I would like to describe example of such small fix - making check-box functionality work in ADF. This topic is related to - custom check box, based on Y/N or 0/1 values. Null value was stored for the checkbox, no matter it was checked or unchecked.

Eventually this was resolved by spotting "Include 'No Selection' Item" was selected for the choice list defined on check box attribute. Don't ask me, why we need to define choice list for the check box field - its weird, but it works. The thing is with "Include 'No Selection' Item" selected, ADF injects blank value into check box definition and even visually it looks all correct - it fails to work from ADF UI (it works from ADF BC test utility):