donderdag 20 januari 2011

setTitle functionality in 10g and 11g

For debugging purposes and more easily tracing issues on the middleware you may want to give your instances a name, or a title. This is possible by putting some code in BPEL to produce a title in the BPEL Console (10g) or the Fusion Middleware Control (11g), even for the SCA composites in 11g.

10g
In 10g (10.1.3.3.0) the following code with the setTitle function will work to produce a Name for the instances in the BPEL Console, resulting in the text "EMPLID" followed by the client:input value, which in this example would be the employee ID:

    <bpelx:exec name="Assign_Title" language="java" version="1.3">
<![CDATA[java.lang.String titleValue=null;                        
oracle.xml.parser.v2.XMLElement titleValueElement= (oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable", "payload" , "/client:TesterProcessRequest/client:input");            
titleValue=titleValueElement.getText();        
setTitle("EMPLID " + titleValue);  
addAuditTrailEntry("EMPLID " + titleValue);]]>
</bpelx:exec>


11g
In 11g there is a comparable functionality with the function ora:setCompositeInstanceTitle("Hello World"); which can be used in for example an assign activity in the From statement and for the To variable a dummy could be used.


Other info
You can also do a direct update on the database level in the OraBPEL schema on the column "Title" in the CUBE_INSTANCE table (ORABPEL.CUBE_INSTANCE.TITLE). This works on 10g, I have not tried it on 11g. It's of course not recommended by Oracle.

Also note the following bug on Oracle support:
Bug 9953763 - SETTITLE FUNCTIONALITY IS MISSING IN INSTANCEHANDLE OF JAVA API

And I found this article to be rather interesting: http://technology.amis.nl/blog/2387/embedding-java-in-bpel-process

New features SOA Suite 11g

* Composite Applications
With a functional design on a logical level an application is one component. When building the application functionality is split up over multiple technical components, for example BPEL, Java, database or file adapters, business rules and human workflow. So complexity goes up and maintenance, build, test, etc goes up as well. By the way which SOA Suite 11g approaches composite applications using the SCA assembly model, complexity will not get out of hand, while retaining possibilities to easily reuse (previously created or out of the box supplied) assets.
* OER
Oracle Enterprise Repository will be getting more integrated as 11g matures.
* AIA PIPs
More PIPs will be created by Oracle or in conjuction with clients or third parties (like Capgemini).
* JCA
A JCA-based connectivity infrastructure will provide an embedded policy manager for security.
* Business rules
Business rules take a more important role in 11g. The 'Decide' activity is even replaced by the business rule activity. In the next release there will also be a webbased GUI for (business analysts) users to modify the business rules directly at runtime.
* SOA Fabric
In the coming releases a more integrated SOA Fabric will be introduced.