Posts tagged BPEL

Developing and deploying Java Embedding activity in BPEL 2.0 in SOA Suite 11g calling a custom Java Class that has dependencies on 3rd party libraries

Java Embedded activity can call a custom Java class that relies on 3rd party Java libraries. This means that a lot of existing functionality from the Java open source community is at the disposal of the BPEL developer. This article shows a simple example of developing and deploying a BPEL process that uses Java Embedded Activity that calls a custom Java Class that uses Apache HttpClient to make Http POST calls. The article demonstrates how to develop the BPEL process, the Java Embedded activity, Java Class and how to deploy the SOA Composite application. It also presents the results of running the composite application.

Read the rest of this entry »

Introduction of BPEL 2.0 forEach activity – valuable loop and standard based successor to FlowN

BPEL 2.0 introduced the forEach activity – similar to for [-loop] found in many programming languages. Oracle SOA Suite 11g adopted BPEL 2.0, first in run time (PS2) and later in Design Time (JDeveloper) as well (PS3 an beyond). For BPEL processes created using BPEL 2.0, forEach is a looping mechanism – similar to repeatUntil and while – and also the successor to the proprietary Oracle extension to BPEL 1.x called FlowN. In that latter capacity, forEach is the activity that enables parallelism in BPEL processes to a dynamic degree.

The well known Flow activity also supports parallelism – but only for a static number of branches, known at design time. FlowN (1.x) and forEach (2.0) add the ability to execute a scope a dynamic number of times, determined at run time. Image

For example when an operation needs to be performed on multiple elements in a collection, such as all order lines in an order or all persons in a travel booking, forEach is valuable – especially when it makes sense to perform the operation on multiple elements at the same time.

Note however that parallelism in BPEL is a relative concept: a single BPEL process instance is never operated on in more than one JVM thread, so there is no real parallel execution at CPU level.

However – when asynchronous activities are ‘waiting other activities can be performed ‘in the mean time’. Examples of asynchronous activities are Wait, Receive (for a reply to the invoke of an asynchronous service, Pick (onMessage and/or onAlarm).

Image

When the forEach scope contains such asynchronous actions, it can provide parallel execution by executing the scope for the next element in the for-loop while the previous element’s iteration is waiting for an activity to continue or complete.

Read the rest of this entry »

Keeping your process clean: Hiding technology complexity behind a service

This blog will explain how you could abstract technology behind a service so your main process will be kept clean of all kind of technology pollution like exception handling, technology adapters and correlation. Read the rest of this entry »

Getting started with … your career (in Dutch)

Als bezoeker van deze blog ben je bezig met het maken van mooie oplossingen en nieuwe uitdagingen op technisch gebied. AMIS nodigt je uit om ons team te komen versterken. AMIS wil je op het gebied van Oracle en Java uitdagen de volgende stap in je carrière nemen.

AMIS merkt al enige maanden dat de markt voor Oracle en Java opdrachten aan het aantrekken is en maakt dat concreet met het uitvoeren van innovatieve opdrachten.

Om je een beeld te geven van het werk bij AMIS volgt hieronder een lijst met de trajecten waar we de afgelopen maanden aan gewerkt hebben.

  • OSB / SOA Suite implementatie bij een grote informatieverwerkende organisatie.
  • Realisatie in ADF 11g van een backend applicatie voor een internetwinkel.
  • Realisatie van een SAAS oplossing op basis van Hibernate, Seam en RichFaces.
  • Realisatie van een medisch registratiesysteem in ADF.
  • Advies op het gebied van het gebruik van ADF 11g in combinatie met JHeadstart voor een energiebedrijf.
  • Realisatie van een SOA / BPEL implementatie voor een pensioenfonds.
  • Realisatie van een administratiesysteem voor een verzekeraar buiten Nederland (EU) in ADF 11g en JHeadstart.
  • Oracle XML DB implementatie voor een grote bank.
  • Realisatie van een SOA Suite / BPEL oplossing voor een grote logistieke leverancier.
  • Proof of concept ADF 11g bij een groot adviesbureau.
  • Oracle APEX / GIS implementatie bij een groot adviesbureau.
  • SOA / BPEL traject bij een grote gemeente.
  • Oracle WebCenter, ADF 11g, SOA Suite 11g en OSB traject bij een grote wereldwijde dienstverlener.
  • Webservice koppeling met ADF en JAX WS voor een grote gemeente.
  • Advies en implementatie van een professionele ontwikkelstraat bij een IT-bedrijf
  • …..meer
Kom werken bij AMIS, kijk http://www.amis.nl/vacatures

Eva van der Kleij. Neem contact met me op via info@amis.nl of bel 030-6016000

We zoeken Oracle, SOA, Java developers die als medewerker van AMIS de vervolgopdrachten gaan uitvoeren. En denk niet direct dat je hiervoor te weinig kennis of ervaring hebt: jouw toekomstige ervaren collega’s doen niets liever dan jou verder helpen. Ons trainingsprogramma voorziet in een grote diversiteit aan opleidingen en tijdens onze interne kennissessies kun je op veel terreinen iets van je collega’s opsteken.

Kom ons eens van wat dichterbij bekijken en maak een afspraak voor een kennismakingsgesprek via Eva van der Kleij op info@amis.nl of bel naar op 030-6016000.  Bel ons ook als je meer wilt weten over werken bij AMIS of een van de onderstaande functies. Concreet hebben we de volgende vacatures:

Wellicht sta jij volgende maand met een artikel op deze blog, schrijvend over de nieuwe dingen die je hebt geleerd of toegepast.

Tot ziens bij AMIS!

Batch Aggregation of files in BPEL process instances based on correlation

Remco is an interesting guy with unexpected ideas springing from a creative brain. He can make life interesting, challenging and puzzling. This time he had another interesting challenge – not all that weird to be honest. The challenge in short was:

Our invoicing system produces files that contain one or more invoice entries. Every entry describes an invoice for a certain company we do business with. There can be multiple invoice entries for the same company. The objective is to aggregate together all invoice entries for a company – potentially from many different file. For each invoice entry – some special processing involving service calls is required. Once all entries for a company have been collected and aggregated, some additional action is required – for example recording the company invoice aggregate in a database or in a file and call a webservice to perform additional processing. The files with invoices are produced over a period of a couple of hours. It is important that the processes performing the aggregation are reliable – they should not lose any entries.

The specific question we investigated is: can we solve this puzzle using Oracle SOA Suite 11g? And an early approach towards applying the SOA Suite’s capabilities to this challenge was based on BPEL’s correlation mechanism. In short: every company for which the batches contain invoice entries wil have an instance of a composite called InvoiceAggregator. This instance is carried by a BPEL component that has correlation configured on CompanyId. In our test set up, we have the company instance expire after 5 minutes: it will cease aggregation when it has not received new messages for a period of 5 minutes.

Composite InvoiceProcessor contains a File Adapter that reads the Invoice entries from files arriving in a specified directory. Each entry is passed to a Mediator that forwards it to a BPEL component. This BPEL component instantiates the company specific instance of InvoiceAggregator (if it does not already exist). Then it passes the invoice entry to that instance.

Composite InvoiceProcessor is stateless: after processing an individual invoice entry, it terminates (typically in a couple of 100ms). Composite CompanyAggregator is around for much longer – in our set up at least for 5 minutes and typically longer when multiple invoice entries arrive for the company.

Image

Note: this lay out is a simplification of the real challenge. The essence of the correlation based interaction is captured in this example however.

Read the rest of this entry »

Migrating your BPEL 1.1 process to BPEL 2.0 – SOA Suite 11gR1PS2 to PS3

In my current project we just started creating BPEL 1.1 processes. Then SOA Suite 11gR1PS3 came along and gave use BPEL 2.0. As we are just in the early stages of development we decided to have a look at the impact of upgrading our already build BPEL 1.1 processes to version 2.0.

As there are no BPEL 2.0 upgrade tools we had basically two options. The first was to complete rebuild all our processes. Not a very good option to redo all the work. The second options was to manually upgrade the BPEL 1.1 definitions to 2.0. Expecting this to be less work we choose the second option.

The first step was to fool Jdeveloper into thinking a BPEL 1.1 process is actually BPEL 2.0.

1.       In the BPEL source file I changed two namespaces:
xmlns =”http://schemas.xmlsoap.org/ws/2003/03/business-process/into xmlns=”http://docs.oasis-open.org/wsbpel/2.0/process/executable
xmlns:xxx=”http://docs.oasis-open.org/wsbpel/2.0/process/executable”  into xmlns:bpel=”http://docs.oasis-open.org/wsbpel/2.0/process/executable”

2.       In the composite.xml  I added the version=”2.0” attribute to the bpel component  <component name=”name bpel processversion=”2.0”>

3.       Finally I closed JDeveloper, deleted the SCA-INF directory and restarted JDeveloper. The SCA-INF was created again. When I opened the bpel process in the editor it was recognized as a BPEL 2.0 process:

Read the rest of this entry »

Embedded Java in a 11g BPEL process

In an earlier blog my colleague Peter Ebell (link) explained how you can create an extension of collaxa.cube.engine.ext.BPELXExecLet to do your coding in a regular Java environment so you have code completion and validation. In 11g no improvements have been implemented and the Java embedded activity is still a pretty dumb text editor. So the same approach is still valid. But there are some differences between the 1o en 11 version.

The class you need to extend has been moved to a different package: com.collaxa.cube.engine.ext.bpel.v1.nodes.BPELXExecLet. You need at least to include the SOA Workflow library in your project. If you want it to run you need additional packages.

Most of the methods of the 10 version still exist. Only the method getLocator is gone. You now need to get an instance of the locator bean through a factory.

Read the rest of this entry »

Book review of: Getting Started With Oracle SOA Suite 11g R1: A Hands-On Tutorial

Getting Started With Oracle SOA Suite 11g R1: A Hands-On Tutorial

Authors: Demed L’Her, Heidi Buelow, Jayaram Kasi, Manas Deb, Prasen Palvankar (aka Oracle Product Management for SOA Suite)

A hands-on tutorial is what the cover of the book promises, and that is exactly what you get. A quick, very hands-on introduction into the most important components in the SOA Suite 11g. In no time at all, readers will be able to get a composite application up and running. An application that leverages many of the essential features and functions in the SOA Suite.

Some books are primarily an introduction into a certain topic, with lots of theory, background and explanations of what, why and how. Other books are mainly reference material that you use to look things up when you need them. This book is neither – it offers very little in the way of explanation and background and it would be fairly useless as reference guide. It is however a very good way to get to know the SOA Suite – both design time and run time – and get a feel for how to develop for it and run applications in it.

The book contains a large number of informative screenshots and also provides the salient code snippets. It is very focused on getting specific jobs done, and for these jobs it has all the information and illustrations you may need. It is hard to not get it to work following the very detailed instructions.

The book – or at least the paper copy I am holding – is written for the very first 11gR1 release, that was published on July 1st 2009. The functions made available with PS1 release (November 2009) are not discussed therefore.

Read the rest of this entry »

OOW 2009: Introducing SOA and Oracle SOA Suite 11g for Database Professionals

 

The Oracle Open World 2009 conference is almost underway. On Monday 12th October I will do two presentations, and I am done preparing the first one of them (the one that has actually sold one – probably scheduled in a small room).This presentation is one in which I introduce the key concepts and objectives of SOA (Service Oriented Architecture) as well as the Oracle SOA Suite 11g to an audience of database professionals. Whether DBA or Database Developer, SOA is unavoidable. But what (exactly) is it? And how does it impact – positively or negatively – the work and lives of database professionals? What can a database professional do to work well with SOA and the SOA technology once that starts being implemented in her or his organization?

Read the rest of this entry »

SOA Suite 11g – Composite instance as WebService Result Cache using BPEL Correlation

This article describes an architectural pattern, implemented in the Oracle SOA Suite 11g, that is somewhat similar to the Oracle Database 11g Function Result Cache. It introduces a SOA Composite Application in the role of Result Cache. In its most simple form, the result cache is initialized – loaded with values -, used by other SOA applications that need the cached values, refreshed/reset when required and terminated. Through this ‘result cache’ – frequently used and not-so-frequently changed values that are published by (possibly remote, expensive or slow-reacting) web services or adapter services can be made available to local consumers in a simple, cheap and fast manner. We achieve this using the fast native SCA binding used for invoking in-container services exposed by fellow composite applications (that’s for speed) and the BPEL correlation mechanism (that’s for finding the result cache in the first place).

What the actual value of this pattern and implementation are is not yet entirely clear to me. Your feedback is appreciated. What I do know is that this article is also a good demonstration of using correlation and of applying some of the XML manipulation techniques available in BPEL processes.

In a single picture, here is what I created: one or more Composite Instances are initialized; each instance is a cache, identified through its name. Upon initialization, the cache is loaded with values – supposedly important, frequently reused, hard-to-get-by values. Composite applications that are interested in these cached values can retrieve them from the cache, by calling the exposed service and passing the name of the cache (here is where correlation kicks in) and passing the name of the cache entry. The BPEL process looks for the entry and returns the value when found or null and an appropriate message when not found.

Read the rest of this entry »