Monday, October 25, 2010

Spring & BPEL extension functions in SOA Suite 11g PS2

Last December I uploaded a doc detailing a simple Spring lab - here now is an example based on Patchset 2.

To begin with you may need to download the JDev Spring extension (Menu --> Help --> Check for Updates).

An excellent intro to Spring is the official doc at http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/pdf/spring-framework-reference.pdf

Ok, so now back to our simple example -

In this example we will have a Java class that does some simple SOA Composite logging for us. We will leverage the BPEL XPath extension functions as detailed in Appendix B of the SOA Suite Developers Guide - available at http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10224/bp_appx_functs.htm#CHDECDHG

This is based on an excellent example from Clemens Utschig - so vielen Dank!

I'm going to use the following -

ora:getDomainId()
ora:getECID()

ora:getCompositeName()
ora:getCompositeInstanceId()

ora:getComponentName()
ora:getComponentInstanceId()

ora:getElement()

Steps -

1. Create the Java Interface for the logger
2. Create the Java class that implements the interface
3. Spring-enable
4. Expose the Spring component as an SCA Service
5. Create a SOA Composite with a BPEL process
6. Invoke the Spring component from BPEL
7. Deploy and Test
1. Create the Java Interface for the logger
1.1. Create a new generic application in JDev - LoggingWithSpringApp
1.2. Name the project - LoggingWithSpring
1.3. Create the Java interface - ILogger - package name my.company.com




1.4. Add a log() method.


public void log(String domainID, String ecid, String compositeName,
String compositeInstanceID,String componentName,
String componentInstanceID, String elem );
}

2. Create the Java class that implements the interface




2.1. Implement the log() method.

public void log(String domainID, String ecid, String compositeName,
String compositeInstanceID, String componentName,
String componentInstanceID, String elem) {

StringBuffer msg = new StringBuffer();
msg.append("[Domain ID] ").append(domainID).append("[ECID]").append(ecid).
append("[Composite Name]").append(compositeName).append("[Composite Instance ID]").
append(componentInstanceID).append("[Component Name]").append(componentName).
append("[Component Instance ID]").append(componentInstanceID).append("[Input Element]").
append(elem);
System.out.println(msg.toString());
}

3. Spring-enable

3.1. Create a new Spring Bean configuration in the project



3.2. call it logger-context.xml

3.3. Select Spring 2.5 Core in the component palette




3.4. Drag a bean from the Spring 2.5 Core component palette

3.5. set name and class as below




4. Expose the Spring component as an SCA Service

4.1. Change the palette to Weblogic SCA and drag & drop a Service




4.2. Set as follows -




5. Create a SOA Composite with a BPEL process

5.1. File --> New --> SOA Composite --> Composite with BPEL process
5.2. call the composite - LoggingWithSpringComposite
5.3. Create the BPEL process




5.4. Go to the Composite Editor view and drop a Spring Context component.



5.5. Make the Java class and interface.



5.6. Wire together.





6. Invoke the Spring component from BPEL

6.1. add an Invoke activity to the BPEL process to call the logger




6.2. Add an Assign activity to set the call arguments
6.3. See below for the 7 assigns





6.4. add an Assign after the Invoke to set input to output



7. Deploy and Test

7.1. Deploy ot SOA Suite and test via EM.



View results in server log

Tuesday, October 12, 2010

Bruce Silver on Oracle BPM 11g

Makes for very interesting reading -

http://www.oracle.com/us/corporate/analystreports/infrastructure/bruce-silver-bpm-suite-11g-083869.pdf

To quote from the report -
"Oracle not only is first out of the gate with BPMN 2.0 support, but sets the competitive bar extremely high for a long time to come."

Cheers Bruce!

Leveraging BPM Project templates

BPM project templates are stored in MDS. You already have a database based MDS
installed with SOA Suite (DEV_MDS).

In the following simple scenario we will leverage this to work with project templates. We will create a template in JDev and consume it in Process Composer.

Step 1. - Create a Project template in JDev

One thing all BPM projects need are Services.
So this is what our template could contain. So lets begin by creating a new project in JDeveloper of type BPM Template.






Add content to the Business Catalog - currently Business Objects, Human Tasks, Services and Rules etc. are visible in the context of Process Composer.

Create a DB based MDS connection (DEV_MDS schema)

Right click on the project and select --> Publish to BPM MDS




View the MDS repository after publishing.



Now open the web-based Process composer e.g. http://localhost:8001/bpm/composer
and create a new project based on a template.

Wednesday, October 6, 2010

SF at the weekend & Development Frameworks - your thoughts on them...

I've just returned from a pleasant sojourn in SF. I'm there quite often and this time I decided to make proper use of my weekend. So for those of you looking for some suggestions above and beyond the usually tourist stuff here's my 2 cents -

1. Farmers Market - Saturday morning: Embarcadero (Ferry Building) - great organic fruit and veg from the California valley. Also plenty of food and drink stalls - great place for healthy indulgence.

2. Botanic Gardens - just off Martin Luther King drive - well worth the visit even in Autumn.

3. Commonwealth restaurant Mission St: http://commonwealthsf.com/
If crispy pig ears, carrot, radish, chili are your thing then this is the place to be. If not, it's still the place to be with plenty of alternatives.

4. Sunday Morning: Flea markets. I always like to visit the one in Bernal Heights - Alemany Flea Market - 100 Alemany (at Putnam) San Francisco, CA 94110. Also there is a monthly one at Candlestick Park (Candlestick Park Antiques & Collectibles Faire.) Check the web for dates.

5. Later: Drive up to Bolinas - pass Stinson beach and a few kms later you're there.
Stop by my friend David who sells his art there - http://davidjaap.com/about.html

Now back to work...

Thinking about developmment tools & frameworks - which to use and when.
I'm getting some ideas together comparing some offerings. Currently I'm looking at

- ADF
- Java FX
- Ruby on Rails

and would greatly appreciate your input - any heuristics you may have on these or others that you currently use.

for example -

ADF:
- MVC / JSF
- supports 4GL style development (ADF BC)
- etc.

Looking fwd to your input!