Monday, April 7, 2008

Back to Athens

I'm already was in Athens some months ago, but this week I'm back again - doing Oracle ADF consulting. It's always nice to come back here, seems it's summer :-)

Wednesday, April 2, 2008

CRUD implementation with JDeveloper 11g

In this post I want to describe how its possible to implement Create-Read-Update-Delete (CRUD) functionality with JDeveloper 11g. There are many approaches that can be used to implement those functions with JDeveloper 11g. Today I will describe how to develop form based CRUD functionality.

Main advantage of developed sample application - ADF11_CRUD.zip is that CRUD functionality is implemented with Regions and based on ADF Task Flow. This allows to implement logic in separate forms, but to present to user with one page. Regions and ADF Task Flows are features introduced from JDeveloper 11g, in previous releases it was possible to implement CRUD functionality with forms in separate pages or to play with forms rendering using one page. However, both approaches weren't ideal, since users usually don't like to navigate from page to page and on the other hand to implement full functionality inside one page was potential source for bugs.

I have designed ADF Task Flow in my sample application:


Page fragment that is opened first, when running defined task flow is - departments. This fragment contains Master information for Detail part accessed in subsequent pages. Implemented page fragments are aggregated by ADF Task Flow and registered to be used in main.jspx page as Region. ViewController layer structure, one JSPX page and four fragments:


When you will run sample application, main.jspx will be opened and you will see departments fragment:


Here you can choose one of the Departments and go to Detail part - Employees CRUD functionality. User still will be on the same page, however new fragment will be opened - employeesUpdate:


From here we can involve Create functionality in employeesCreate fragment:


You can notice that JobId is read-only in this form, it's because I'm assigning default value for this attribute. However, it can be changed later. JobId is assigned from value stored in #{processScope.JobId}:


When new employee is created, employeesUpdate fragment will be opened automatically. Here you can update employee information:


And finally, when Delete button is pressed, confirmation fragment for Delete action is opened:


Delete action is invoked from Backing bean, I'm using removeCurrentRow() function to remove row from iterator:

Saturday, March 29, 2008

ADF Task Flows - Managing Transactions

You probably already know that ADF Task Flows are much more than simple page flow navigation. I was blogging previously on this topic, you can check - JDeveloper 11g and ADF Task Flow Parameters and ADF Task Flow in JDeveloper 11g. In this post I will describe how it's possible to manage transactions with ADF Task Flows.

Developed sample application - ADFTaskFlowTransactions.zip implements one transaction for Departments and Employees entities, this sample is based on HR schema from Oracle XE database.

How to understood transactions in ADF Task Flows? Basically speaking, ADF Task Flows allow to manage transactions declaratively in View layer. This means we can think about transactions in terms of forms available to the user. For example, if transportation information is entered into system through two screens - Source and Destination, transaction will be successful if both Source and Destination will be valid.

Sample application contains one main page and bounded task flow that implements transaction:


Transaction is opened from main page and is closed when control is returned back to main page.

If you will take closer look into bounded task flow that implements transaction, you will see here two pages and return activity defined. In updateDepartment page Department data is modified and in updateEmployees page Employees data is modified. Modified data is saved during return from bounded task flow:


Basic transaction for bounded ADF Task Flow is configured in two steps:

1. For bounded task flow, in Property Inspector tab, define transaction type in Behavior section. For my sample application I have defined new-transaction type.


2. Define behavior for task flow return activity. I have specified for Task Flow Return activity in Property Inspector tab, Behavior section, commit type for End Transaction property.


Both pages - updateDepartment and updateEmployees don't have Commit action defined in Page Definition files. This means that commit action isn't executed from those pages, it is executed only once when transaction is finished.

No Commit action defined in updateDepartmentPageDef.xml:


And there is no Commit action defined in updateEmployeesPageDef.xml as well:


How implemented transaction works? Transaction is opened from main page, where one of available locations is selected. During transaction, information about departments and employees from selected location will be updated:


Transaction is opened with first screen, where we can browse through and update information related to departments, from here we can open second step in transaction - information about employees update from selected department:


Second form is used to update information related to employees from selected department, here transaction is closed:

Wednesday, March 26, 2008

JDeveloper 11g Masterclass in Vilnius

I'm posting update to my previous post - Oracle Forms to SOA workshop in Vilnius, where I was describing masterclass session I will do on April 14.

Grant Ronald (Group Product Manager in Oracle) have provided more information about event - Oracle Forms Modernization Event in Lithuania (with JDeveloper 11g Masterclass).

Everyone can register on OTN - Oracle Forms: The Road to SOA.

Tuesday, March 25, 2008

Oracle Forms to SOA workshop in Vilnius

I'm happy to announce that I will participate together with Grant Ronald (Oracle Group Product Manager) in Oracle Forms to SOA workshop in Vilnius, on April 14th. This workshop is a part of events Oracle doing across EMEA - Oracle Forms Modernization Events and will be done for local Oracle Forms community.

Grant will deliver two presentations:

1. Oracle Forms: From Client/ Server to SOA. Integrating Oracle Forms and Services

2. Building Services with JDeveloper and Oracle ADF

My presentation is scheduled for 2 hours and will have only some 3 slides :-) Yes, main focus will be to show how it works. I will develop sample application and will describe those steps:

Model:

1. ADF BC generation with wizards
2. LOVs
3. Calculated attributes
4. Validation (4 Compare rules, 1 complex Expression rule and 2 Collection rules)

View Controller:

1. Templates in JDeveloper 11g
2. Page fragments and Regions
3. ADF Task flows
4. ADF Faces Rich Client

SOA:

1. ESB flow to write into File
2. Developed service invocation from ADF application

See you there ;-)

Friday, March 21, 2008

Technical Director in Vgo Software

From next month I'm moving to Vgo Software company in Technical Director position. It will be a new turn in my career.

Vgo Software provides software and services to modernize Oracle Forms to J2EE. Company is based in Manchester, Connecticut, USA.

I will do Oracle Fusion Middleware consulting there, will be responsible for Oracle trainings development and delivering, will represent Vgo Software in various events and conferences and will drive development of the Vgo Software products.

The Best of IBM - IBM Bravo !

Today I received IBM Bravo certificate, for my Top-Performance in IBM Global Business Services, during last year.


This award is for my successful participation in Oracle projects. Thanks IBM !