Oracle Forms 11g and Apex using external events

I remembered an old post of Roel Hartman where he integrated a form into apex.
He used a part of OraFormsFaces by Wilfred van der Deijl: the CommunicatorBean.
Using this CommunicatorBean forms could react on “external messages”.
Now with Forms 11g reacting on external events, this CommunicatorBean isn’t necessary any more(sorry Wilfred).

This is how I did it using external events…
First things first: set up the advanced queueing mechanism.
Check this tutorial which includes setting up advanced queueing.
I created a little form based on emp(nothing fancy)…

The new feature in forms:

With the following properties:

What should forms execute when this event happens?
This has to be specified in the When-event-raised trigger.

In this case we retrieve the payload and extract the empno from it.
The empno is used to set the default where clause on the block.
When there’s an empno on the queue, forms will query that employee.
That’s all for the forms part…
Now I created a little Apex page with two regions:

The Employee details will be our form.
So I put our form in the HTML using an iframe:

Using a “select list” it’s possible to select an employee.

This is the result:

Now the purpose of the select list is to choose an employee and show the detail information in our form.
In order to do this, the select list calls a javascript function.

This javascript function is created in the HTML header

The code behind this:

<script language=”JavaScript” type=”text/javascript”>
function getEmployee (){
var emp = $x(‘P2_EMPNO’);
// send request
var ajaxRequest = new
htmldb_Get(null,&APP_ID.,’APPLICATION_PROCESS=get_emp’,0);
ajaxRequest.add(‘P2_EMPNO’,emp.value);

// get response
ajaxResult = ajaxRequest.get();
ajaxRequest = null;
}
</script>

This javascript function calls an application process and uses the empno as parameter.
The application process put the empno on the queue.

When changing the select list, the form is queried

This is a solution to integrate forms into another application whether it’s Apex, ADF or another web applicaton.
When it can put something on the queue, forms can react on it.
And yes, I could do it using the javascript feature in Forms 11g. I know…
And for Apex it’s probably a better solution, as we can skip the AQ part and make calls to and from forms in Javascript.

Forms 11g javascript integration: Call others

Forms 11g holds a lot of interesting new features focused on event-driven architecture, one of these is javascript integration. There are two ways of using javascript with Forms 11g: “call others” and “let others call you”.

Javascript can call code in Forms(“Let others call you”) using the new forms trigger “when-custom-javacript-event”.

This post is going to show you the first one: “call others”, in other words call javascript from your Oracle Forms application.

During the Forms Modernization Seminar I showed a google map that could be manipulated from an Oracle Form. It’s an easy implementation with only a few lines of code(most of the javascript is taken from the api examples on the google code site: http://code.google.com/apis/maps/).

  • Build a little form with one (control) block, one text field(to enter an address) and one button(to call the javascript code).
  • Next step is to create an HTML-page to display the form.

This code puts the form(in an iframe) and the map side by side:
(Click to enlarge)

And it will look like this:

  • The javascript that will be called is put in another file google.js:

  • The only thing to do is creating a “when-button-pressed” trigger in forms to call the javascript function showAddress.
    This is done by a new built-in procedure web.javascript_eval_expr:
  • Copy the HTML and javascript file to the following directory:
    <middleware_home>\user_projects\domains\<domain>\servers\WLS_FORMS\tmp\_WL_user\formsapp_11.1.1\e18uoi\war\
  • Create a new configuration using Enterprise Manager:

  • Make sure the parameter EnableJavascriptEvent is set to “true’ in your configuration!

And the working demo…

Forms Modernization, Part 1: Motivation for change

In the first part of our seminar we discussed some topics that forms customers want to change today.

These changes are mostly focussed on the island most forms applications and teams are working on today, such as:

    1) Internal services that are provided within the enterprise that could uplift the provided functionality to the end users.

    E.g. Order-information that is provided via a webservice of the existing legacy application. This information can be provided to the back-end and forms interface to have real time information provided to the accountancy-department that is using the forms app.

    2) External services that are provided by partners that could uplift the provided functionality to the customers and the business users.

    E.g. a good example of the ROI is explained in the ZLM Case Study.

    3) Existing pl/sql functionality that can be offered as a service to enterprise applications or external partners.

    E.g. the forms application handles the allocation of consultants of iAdvise. To be able to provide customers a better service we could offer the business unit managers, pre-sales and sales a real-time view on the whereabouts (no we don’t play tennis ;o) ) of the consultants. In other words, a customer is facing production problems and needs support asap, the sales person looks up which consultants are nereby the customers with the needed skills. Given the coordinates the sales-person can then call the consultant and give the customer a much better service without needing to cross to many channels to get the necessary information.

    4) Get on the fusion track and let your forms application talk to you jee, adf, apex, custom made application.

    You want to integrate new functionality which is provided through ajax, java server faces, event driven architecture, … to improve look and feel and to let end users profit from the added value such as asynchronous event handling, JavaScript integration, …

In other words when you start thinking about improvements you could make to your existing forms application, the ROI mostly is very obvious.

The investments made in human capital, architecture and infrastructure are protected whilst enabling integration of new technologies and improving your existing skill set and investments.

What I would like to know from other customers, developers, end-users, …:
Is anybody facing integration/modernization issues today within their Forms Apps that can’t be addressed using one of the following scenario’s: modernization, integration, upgrade to 10g/11g?

If so, please provide us this information so we can discuss the different scenario’s, aspects that are applicable to your specific case.

Oracle Forms … alive and kicking

Yesterday Gert Poel, Yves Van Looy and myself organised a Forms Modernization seminar for customers, developers, partners … everyone that was interested.

The seminar was a huge succes and the customers were reassured that Forms is still alive and kicking.

First we discussed the improvements customers want to make to their existing forms applications, why would you want to change. Afterwards we discussed the how, which different scenario’s are applicable when you want to modernize your Forms Application. Most customers are indeed looking to improve their UI, open up the forms application’s services and integrate them within the enterprise, service-enable the existing pl/sql functionalities.

After the theoritical approach we showed some of our succesfull case studies, such as the ZLM Case that’s published on the Forms Modernization URL. These cases showed the customers how to achieve integration of forms with a soa architecture, how to implement a document workflow within forms and how to modernize your UI using LAF, thanks to François Degrelle’s resources.

In other words the first part of the seminar hit the nail on the head ;o)

In the second part we demonstrated the Forms 11g release and discussed the migration path towards 11g. This was very interesting for the customers as well because they were reassured that Forms will be part of the fusion ages. Most of all, Forms is one of the players within Event Driven Architecture using the AQ-mechanisme, thus using the scalability and performance of the Oracle Database.

The attendees’ feedback was great and they were eager to start modernizing … in other words: Forms will no longer be an island within the organisation but will definitly become an important player within the fusion strategy.

I would like to thank the attendees, Gert & Yves for the great experience !

Let’s start modernizing !!!

Oracle Forms Modernisation at Oracle Open World 2010

This year we’re able to give another Oracle Forms Modernisation seminar at Oracle Open World 2010 … YIPIE !!!

We will be discussing the different aspects a Forms Customer needs to take into account when wanting to uplift the existing Forms Applications. Different scenario’s could range from modernisation to upgrade, integrate and last of all migrate if this has been a strategic decision in the company’s business plan.

1st of June we’re already giving a sneak preview of these different scenario’s to our benelux customers … and looking at the number of attendees it’s already a succes.

In other words … stay tuned and make sure you’re present at the Oracle Forms Modernisation seminar at OOW 2010.

Oracle Forms Modernization seminar

iAdvise organises a seminar on Forms modernization.

During this seminar we will show you how you can modernize your Oracle Forms applications, give it a rich look and feel, and adopt the latest technologies without throwing away years of investment in Oracle Forms.
We will show you how you can combine the power of an Oracle Forms application with functionality from external application (javabeans, pluggable java components, webservices,…) and how you can give a Forms application a modern “look and feel”.

Also part of this seminar is an overview of the new features in the latest Oracle Forms release(11g)

When: June 1, 2010
Where: iAdvise office, Kontich
Language: Dutch

View invitation

What new features would you want to see in Oracle Forms?

A few months ago I wrote a blogpost about forms titled  “Forms isn’t dead!”

Since then I went to Oracle Open World and gave a presentation on how to modernize your existing Oracle Forms application.
So you don’t have to throw away years of investment in Oracle forms.

I’m working at a customer that created a new application in Forms 10g and it was put in production last year.

And now there’s a thread on the OTN Forms forum started by Grant Ronald(Product Manager at Oracle):
What new features would you want to see in Oracle Forms?

So, if you want a cool new feature or an improvement in Oracle Forms…you know what to do!

Still not convinced that “Forms isn’t dead”?

Apex, a 4GL-for-the-Web…

Until now, Oracle JDeveloper (with ADF) was always positioned by Oracle Corporation as the successor for Oracle Forms.

Now, with the release of Apex 3.0, it is the first time, — as far as I know — that Oracle Corp. considers ‘openly‘ Apex as an alternative for Forms.

On the restyled Oracle Apex Home on OTN, you can find a small comparison between both tools: both declarative, SQL & PL/SQL driven, … Read the rest of the article here.

Especially, pay attention to the “development status” of both products: Oracle forms is in ‘maintenance mode‘, while Apex is in Active Development‘!