Thursday, June 26, 2008

After my last week presentation on ODTUG Kaleidoscope'08 - Development with Oracle JDeveloper/ADF 11g Reusing 10g Best Practices, I was discussing with a guy from auditory and he have talked to me about problems with remote task flow invocation in JDeveloper 11g. So, in this post I will cover this topic. Generally speaking, possibility to call remote task flow is new feature in JDeveloper 11g and there are still problems in Technology Preview 4 in this area. You can refer to OTN Forum post - TP4 error with calling remote taskflow. Actually, currently it works, but only when calling remote task flow directly with complete URL. In my sample application I have implemented this case.

You can download two parts - JobsLocal.zip and JobsRemote.zip. Those two parts are completely separate applications, however from JobsLocal I'm calling remote task flow available in JobsRemote application. Implemented functionality - in JobsLocal user can select Job from a table and pass selected Job key to remote application, where master-detail form for Job and Employees is opened according to passed key value. Both applications are implemented based on HR schema from Oracle XE database.

You can notice back control flow case pointing to URL View activity. This activity is used when going back from Remote application - in this case I'm going back by calling jobs page from Local application by URL:

If you will run this sample on your local computer, make sure that you are using correct URL.

When task flow in Remote application is defined and components on the page are created, its time to create deployment profile - ADF Library JAR File. We will pack our Remote application as JAR file in order to use defined task flow in Local application:

In order to create JAR after deployment profile is set, just right-click on ViewController and choose Deploy -> Deployment Profile Name -> to ADF Library:

Now its time for JobsLocal application, at first add generated JAR library to Application Resources by selecting New Connection -> File System... in JDeveloper 11g section called Application Resources:

In opened dialog - Create File System Connection, provide Connection Name and Directory Path. Optionally you can Test connection and if Status is positive press OK button:

Library with JobsRemote application task flow is added and you can drag and drop it to the task flow in JobsLocal:

When you will drag and drop it, JDeveloper 11g will create it as Task Flow Call activity:

Only one thing you will need to do is to provide URL for remote application. In our case, I'm constructing URL dynamically in Backing bean method (make sure it is correct in your environment):

getRemoteTaskFlowURL() method retrieves selected row key from Jobs table and adds it as a parameter to remote task flow URL. I'm using the same name for parameter as it is defined in task flow from JobsRemote application.

You can run both applications in parallel directly from JDeveloper 11g, just you will need to use Integrated OC4J option, by default Embedded OC4J option is used. You can switch just by opening Tools -> Java EE Runtime Preferences.

At first, you will need to run bounded task flow from JobsRemote application, since this task flow is called from JobsLocal.

When JobsRemote will be up and running, run jobs.jspx page available in JobsLocal application, you will get similar screen:

In my case I have selected row with JobId = SA_MAN. When Edit Job button is pressed, it navigates to task flow available in remote application - JobsRemote by passing selected job key value:

Remote application is opened with correct data for provided key. You can edit and save data from this screen. Button - Back, through URL call will navigate to original jobs.jspx page in JobsLocal application:

Saturday, June 21, 2008

Today was my last day in New Orleans, going home tomorrow - yesterday was last day of ODTUG Kaleidoscope'08. I decided to spend some time today for tourism activities and visit New Orleans swamp where alligators live. I was using New Orleans High Speed Airboat tour, it was cool, I recommend it for everyone who will be there. Yes..., alligators also are friendly, sometimes... :-)

Thursday, June 19, 2008

During this year ODTUG Kaleidoscope'08 conference, almost everyone is talking and comparing APEX with ADF and ADF with APEX. It sounds quite funny for me and just a waste of time in most of the cases. Both products are good and both have areas where can be used. However, APEX is not a central and strategic tool in Oracle. JDeveloper/ADF is strategic combination and powers next generation of Oracle Applications.

Basically speaking, as Tom Kyte said during his "How Do You Know What You Know..." keynote on Sunday - "APEX is a database browser". APEX power is in rapid and departmental style applications, when user friendly database interface is needed.

JDeveloper/ADF is a different story, this technology allows to develop organization wide system and to solve so important nowadays integration problems.

I have heard, it happens in organizations with dominant PL/SQL expertise, that people suggest to develop complete enterprise systems only with APEX :-) In my personal opinion, both APEX and ADF are the best in their areas, just its very dangerous to think like this - "since I'm expert in this product, I can do everything only with this product".

Wednesday, June 18, 2008

I'm enjoying this year ODTUG Kaleidoscope conference. I already did my two presentations, Development with Oracle JDeveloper/ADF 11g Reusing 10g Best Practices was on Monday (June 16) and "Oracle Forms Conversion to ADF 11g at VGO" was yesterday (June 17) during Oracle ACE Directors briefing. Presentation on Monday was well attended and I met a couple of my blog readers ;-)

My colleague - Rob Nocera, was presenting "Using ADF 11g as Platform for Oracle Client/Server Forms Conversions" topic and he got very good feedback from audience. He was doing demo during his presentation as well.

I got clear view during this conference - Oracle Fusion Middleware is not anymore something abstract and unclear. Oracle FMW became focused on Oracle ADF framework, based on ADF Business Components. Its not a surprise, since new generation of Oracle Applications is based on this platform. However, Oracle TopLink (available in Model part of Oracle ADF) is used in Oracle SOA related products and solutions.

And of course, its a lot of fun to meet other Oracle ACE Directors with whom you chat almost every day - Chris Muir and Frans Thamura.

Saturday, June 14, 2008

Hey New Orleans, I'm arrived to ODTUG Kaleidoscope 2008. I was lucky - no significant flight delays and travel was on time. Only one thing - time difference here is 8 hours comparing to my local time, hope I will not have any jet lag, at least I do not feel it now :)

My second presentation will be during Oracle Fusion Middleware Product Briefing for Oracle ACE Directors. Oracle invited me to present about JDeveloper/ADF 11g projects I'm involved in. Presentation title - "Oracle Forms Conversion to ADF 11g at VGO". I will talk how we are adopting Oracle FMW 11g and how work is progressing.

ODTUG Kaleidoscope is one of the best Oracle technical conferences, I'm sure will get a lot of knowledge here by attending this year sessions - abstracts.

Tuesday, June 10, 2008

I have very exciting news - my abstract for Oracle Open World 2008 session is accepted by Oracle and I will represent Vgo Software on this event. I will be presenting on the following topic - "Oracle Maps in JDeveloper 11g - Perfect Combination".

Actually, it was extremely good news for me, since there was only 5 (2.5 for Database and 2.5 for FMW) free slots available for Oracle ACE Directors submitted abstracts. So, I'm really happy, to take 1 slot from 2.5 available :-)

You can read about Oracle Maps combination with JDeveloper in my previous blog posts. I will provide detailed information about my presentation more close to the event.

Sunday, June 8, 2008

Standard way to create buttons on the page, is to use drag-and-drop method and JDeveloper wizards. However, sometimes its not enough, especially when there are requirements to apply dynamic rules based on security roles or page groups. With dynamic buttons generation, you can use XML configuration files, this will allow to change displayed buttons and properties right on runtime. I'm writing this post, based on influence I got from Frank Nimphius post - ADF Faces RC - Implementation strategies for global buttons in page templates. Frank describes fundamental approach for global buttons, I'm in my post focusing on dynamic global buttons aspect.

You can download developed application - GlobalDynamicButtons.zip. This sample is based on two Entity objects - Countries and Locations, and provides two JSPX pages based on template JSPX. Button components for both pages are generated dynamically. Here is a navigation flow implemented in current sample:

Both of the pages are based on template. This template defines facet for data-bound components and empty toolbox for dynamically generated buttons:

You can notice, that toolbox contains two toolbar components, button objects will be added to those toolbars. Toolbox is binded to managed bean, this allows to initialize toolbox component on the page:

Next step is to bind BeforePhase property of f:view tag contained on the pages to the same managed bean where dynamic buttons are generated:

#{dynamicGenerator.addButtons} method generates dynamic buttons according to current page, information about current page is accessed through phaseEvent, for example:

Buttons are binded to actions defined in actual page definition using ActionListener, disabled property is also set programatically:

If button is not binded to page definition, and is is related to navigation flow, action expression is set:

Main advantage of described approach is that it allows to have the same code for the same actions in different pages - Commit action, for example. And only what you need to care about, is to define actions in page definition files. Actions for countries page:

Actions for locations page:

On runtime, all buttons specific to current page are generated:

First and Previous buttons are disabled, since first entry is shown, Locations button opens locations from current country:

Different set of buttons is generated and by default there are no locations defined for Argentina, we can create a couple:

When Save button is pressed, records are stored to database and sequence values for LocationId column are assigned:

Friday, June 6, 2008

I want to see this group as place where Oracle Forms to SOA modernization methodology and strategies will be discussed, as well as technical issues. It should be a good place to share experience and best practices from related projects.

Wednesday, June 4, 2008

This time I'm not only providing Oracle Fusion Middleware consulting in Greece, Athens. But doing some active tourism activities as well. If someone will be in Greece, I can recommend to take 1-day Saronic Island Cruise, it will help you to understand this country in short period of time.

I have visited three islands - Aegina, Poros and Hydra. Last one became my favorite one: