Wednesday, January 30, 2008

Name-value Pair Transformation in BPEL

A pattern you often see is that some generic message type containing a number of 1..n name-value pair attributes needs to be transformed to specific attributes of a specific message type. For example, a portal of a some local government accepts a range of service requests that need to be transformed to a specific request for a passport, a parking permit and so on, to be able to be processed by specialized back-office systems.

The generic message type could for example be defined in an ServiceRequestForm.xsd as follows:

As you can see, the name-value pair attributes are passed on a a repeating set of formItems.

Let's assume that the specific type of message it needs to be transformed to, is based on the value of the serviceType attribute. In case the value of that attribute is "passport request" the ServiceRequestForm needs to be transformed to a PassportRequest.xsd consisting of the following attributes:

Now let's assume we are using BPEL to process the messages and let's assume no performance reason is keeping us from using an (XSLT) transformation (Transform) instead of a series of copy actions in an Assign. So for passports we create a transformToPassportRequest.xsl in which we would like to map the formItems at the left side of the following picture to the specific name, address and city attributes at the right side.

The simplest way to achieve this is by creating a so-called user-defined XSLT template that takes the name of an attribute as argument and transform the corresponding generic name-value pair attribute to the specific attribute. To this purpose we put a template called "getItemValue" at the bottom of the XSL file, as follows:

After you have done so, you will will find the getItemValue template in the User Defined Named Template drop-down in the component pallet of the XSL editor.

After you dragged & dropped that template from the component pallet in the middle section of the mapper, you can create a link from the formItem attribute to the template and from the specific attribute to the template, as has been done for the address attribute in the following figure:

To make that the template transforms any formItem attribute for which its name attribute has the value "address" you need to pass in 'address' as argument.

In a similar way you can transform formItem to the two remaining attributes, finally resulting in something like the following:

Ah... if everything would be as simple at this!

Monday, January 14, 2008

Where To Download OUM

Edited on August 2, 2011 with the correct link and partner types.

As a follow-up on my previous post about the Oralce Unified Methodology (OUM) being out, you can download the method from here.

Mind that OUM is only available to Gold, Platinum and Diamond Partners. On the download page is an email address that can be used to ask for a password that you will need to be able to unzip the OUM download file.

There is a known "bug" with OUM, being that if a Word work product is exchanged between two people that have not installed OUM at the same location (by default C:\method), the person receiving the template will get an error when trying to open the document, saying that the template (.dot file) cannot be found. The solution is to make sure that everyone installs OUM at the default location and by letting people that have not done so, uninstall and then reinstall it at the default location.

Thursday, January 10, 2008

OUM Is For Weenies, Real Developers Create Their Own Method!

When I encounter a situation where people could greatly benefit from a methodology to structure their development process, and suggest to have a look at Oracle Unified Method (OUM), I often get as a reaction that OUM is too big and too complex.

Funny thing is that I hear this often being said by people that some years ago took months if not years to learn methods like the Oracle's Custom Development Method (CDM) and Project Management Method (PJM). Sometimes it is even said by people that never had a look at OUM themselves and only judge based on hear-saying.

But what would be hilarious would it not waste so much resources is that, rather than pick a method of the shelf, people start working on some method of their own. It usually starts small, initiated by an imperative need to write down a specific procedure and capture some standards & guidelines etc. But from there the library grows and before you know it they have spend man-months on defining their own method, spending a multiple of the budget it would have taken to adapt OUM, including a customization to the organization specific needs.

Therefore guys, before you start inventing your own wheel, have a look at OUM and check if that can make you start rolling.