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 - 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:


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


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 !

Wednesday, March 19, 2008

JDeveloper 11g and SOA Suite 11g integration

On my blog you can find application I have developed previously - Invoking BPEL Process from Oracle ADF Application. Application described in my previous post is developed with JDeveloper 10.1.3.x, BPEL process with parameters is invoked here, however I don't return any parameters back to ADF application from BPEL process. Today I have developed new application based on JDeveloper 11g TP3 and SOA Suite 11g TP, where a set of parameters is accepted and returned by BPEL process from and to ADF application.

Sample application for this blog post is based on two parts - and First part contains a simple BPEL process that accepts and returns a set of parameters. Second part is ADF application that invokes BPEL process, receives result from BPEL process and stores this result into database. I'm using HR schema for this sample, you can find this schema in Oracle XE database.

In order to run developed sample application, you need to configure JDeveloper 11g TP3 according to instructions available on this page - Oracle SOA Suite 11g - Technology Preview. Just follow install instructions and it will work. May be also this Oracle SOA Suite 11g Technology Preview - Configuration Hint will be useful.

SOA part in developed sample application is relatively simple, it contains one BPEL process:

This BPEL process accepts input parameters, performs some calculations and returns updated parameters:

Since there are three parameters - EmployeeID, SalaryValue and CompensationValue, updateSalary Assign activity implements Copy operation and provides values for process output:

However, one of the parameters isn't just copied, but modified - SalaryValue is increased by 100:

If we will test developed BPEL process and will provide 5300 as a value for SalaryValue parameter:

Generated result will have 5400 for SalaryValue parameter:

Now let's talk about a second part - ADF application. Here I have created Web Service Data Control based on WSDL for BPEL process:

As a result, I got a possibility to invoke BPEL process and to have a Data Control for returned parameters:

BPEL process invocation is defined in Page Definition file:

I'm accessing results returned from BPEL process through accessorIterator, this iterator is binded to methodIterator which is related to BPEL process invocation definition. accessorIterator and methodIterator definitions:

And finally, all fun stuff is done in Backing bean method associated with Update button:

In this method I'm invoking BPEL process, retrieving returned result from accessorIterator and storing updated value into database.

How it works? Let's say we select employee with STOBIAS email and press Update button:

Salary value is updated by 100:

Wednesday, March 5, 2008

Oracle Maps in JDeveloper 11g - Perfectly Fits into Enterprise

Let's get back to Oracle Maps topic again, in this post I will describe how spatial logic in JDeveloper 11g can be combined with traditional non-spatial operations. Before reading this post, I suggest to read my previous post - Oracle Maps in JDeveloper 11g - Even More Simple, I describe there how to develop and run basic Oracle Maps application.

Developed sample application -, demonstrates how Search functionality can be implemented with Spatial technology. I'm using MVDEMO datasource for this application, you can download this datasource from OTN. Sample application implements a form with a table for search results, however there is no traditional search parameters in this form. Search criteria is defined using Oracle Maps functionality. Based on this criteria, query in database is executed and table with results is refreshed. It also allowed to update rows available in results table, changes are reflected in generated map as well.

Ok, let's describe this with pictures. Here you see Oracle Maps screen and table with Search results:

Oracle Maps comes with Circular selection tool, you don't need to develop it, just use it. So, five customers are selected spatially - results table is refreshed and shows information only about those five selected customers:

Now let's select only one customer - EMBARCADERO CENTER 3, Sales here are around 181:

If row contained in results table is updated, related point on the map is updated as well. I have updated Sales to 70, and you can notice it's reflected on the map:

Oracle Maps comes not only with Circular selection, but with Rectangular, Multy-Point and simple Click selection. Rectangular selection:

And refreshed table with selection results:

And it's really not complex to develop all this stuff. There are three main points:

1. Map Theme Selection Listener

I have defined Selection Listener for Customers theme. This listener receives all events related to Customers theme selection:

You can find code for this listener in Backing bean class. Developed code manages keys for selected points, invokes query and executes results table visual refresh.

2. Search results table refresh

When keys for selected points are prepared, selectCustomers method in Model layer is executed to query database and refresh View object:

This method is defined in Page Definition file and is invoked from Backing bean class:

In order to refresh table visually, from Selection Listener available in Backing bean class, it's enough to use only one line of code:


3. Search results editing

To update edited rows in Search results table, standard Commit action is used. However, it's important here to refresh both after Commit action is done - table and map. So, I have enabled PartialSubmit for Save button and provided PartialTriggering for table and map components pointing to Save button.

In my future posts, I will describe more sample application related to Spatial functionality.