One of the toughest things in Business Process Management (BPM) is to maintain long running process, and the challenges get  bigger when a large number of long running processes need to be constantly upgraded to new versions to meet the growing need of ever changing business environment.

BPM processes are subjected to frequent changes to keep them relevant with the growing business demand, with every change the in-flight process instance needs to be migrated from older deployed version to latest deployed version to keep them up-to-date. Migrating in-flight instances of long running process is not an easy task. Though Oracle BPM workspace  provides “migrate instance” option for migrating in-flight instance , but it is not sufficient for migrating instance across different revisions (even with minor changes). Moreover the “migrate instance” option works when changes are redeployed over the existing process version which is not a feasible option in a production scenario as rollback wouldn’t be possible in-case of any failure.

In order to migrate in-flight instance across different revision Oracle BPM does not provide a straightforward approach, only from PS4 onward it started to shipped an ant base tool (ant-composite-instance-migration.xml) which can be found under ORACLE-MW-HOME/bin location. To run ant-composite-instance-migration.xml tool one has to create a wrapper script to call its targets.

The wrapper script should have the following elements

locatorConfig : This element is use for providing BPM server connection details. It contains an id, bpm server host-name, port number, admin credentials (username and password). Currently locatorConfig can only connect over non-ssl port as it backend java api hardcoded to use t3 protocol.

locatorSession : This element represent locator session which is the parent element of other elements. Every other tasks needs to performed within this locator session.  locatorSession contains configid attribute which is use to link locatorSession with locatorConfig.

compositeInstanceFilterDef : This element act as a filter that selects the composite instances for migration. compositeInstanceFilterDef comes with different combination of attributes which can be leveraged to build a desire filter.

generateMigrationFlowReport : This element synchronously generate flow migration report. generateMigrationFlowReport contains filterid,reversion and outputfile attributes.



MicroServices for BPM

Posted: July 25, 2016 in Uncategorized

In the recent times we have seen an exponential growth in microservices adaptation as an enterprise service architecture. Mostly driven by the vast acceptance of mobile(portable) devices at organisation level, microservices architecture is quickly replacing old monolithic systems with smaller micro type services deployed on a lightweight containers.

BPM (Business Process Management) application typically are highly complex, as they often need to accommodate widely different user interfaces, several generation of databases ,document repositories , legacy systems,enterprise systems,multiple media type and uncertain bandwidth capacities. Further complicating the matter is the fact that a BPM application needs to constantly evolved to address changes in the business environment.

The benefit of using microservices over traditional hub and spoke ESB (Enterprise Service Bus) in BPM applications is huge which makes it more lucrative for BPM application to incline towards MicroService Architecture(MSA).The main USP (Unique Selling Point) of a BPM application is its agility an its adaptivity  towards constant changing business landscapes, which is mostly because of its loosely coupled relationship between its components. Using MSA we could bring more strength and agility to that relationship.

Microservice is the way to move away from monolithic systems, when we build a BPM application on top of Microservies Architecture we can build “Non-Monolithic Enterprise Processes” which ensures any failure does not cascade to downstream systems leading to complete disaster, making an enterprise wide failure a long forgotten history.

Microservices guidelines further ensures service development teams to work independently which gives the teams the ability to work on their services without waiting for the other teams to complete their work. Leveraging this feature from MSA , BPM application can keep itself relevant to the current business needs at the same time evolving to support future requirements.

However, just adapting  microservice for developing services for BPM application will not ensures success. One has to make sure its implemented right. Theoretically each functionality can be decomposed into a granular micro-type service, but in reality judicious effort is required to decide what granular level one needs to decompose a service. If its too granular its ended up with too many integration points within the BPM application OR if its too coarse the benefit of microservice is lost…..

There are number of different blog post on this topic where everyone is in a race to showcase their skills to write java code within a BPEL 1.1 or BPEL 2.0 process. While working on an old code I found out that at times it could be cumbersome to write java code within BPEL 1.1 or BPEL 2.0. There could be number of different parameters that can go wrong while trying to write java code within BPEL java embedded construct. So here is an approach which I feel would work for most of the scenarios; instead of directly writing the java code inside Java Embedded BPEL construct one can create a simple wrapper class and call its method from the Java Embedded BPEL construct.

This approach just needs only two things to be in place to work:

  1. The wrapper class needs to be created under <APPLICATION_HOME>\<BPEL_PROJECT_HOME>\SCA-INF\src
  2. Following Import element to be added to the BPEL file

This approach worked for me; do let me know if its works for you.

High level overview of Oracle API Catalog

Oracle API Catalog (OAC) allows organizations to easily build catalog of their services offered (Web Service & REST/JSON Services) to provide better visibility for those who are intended to use/reuse the services.

OAC is an easy-to-use governance tool for capturing what services exist, what these services do, and how they can be consumed. OAC includes a simple meta-data model for an API asset, automation to populate OAC, and the ability for users to search OAC for APIs and understand the details of the APIs to assess their fit in the user’s application.


Collect Service (harvesting)àAdd/Edit metadata to the service APIà Publish to API Catalogue à Discovered

Different Persona involved in API Catalog

Service Developer: One who develops the reusable services.

Curator: One who edits the meta-data and publishes the API for other developers to view /rate/use the publish APIs.

Developers: One who is going to use the services/APIs and rate them.

Administrator: Admin role user can perform both of the above mention roles.

High Level Installation Steps:

1. Install oer_generic.jar

2. Install patch # 18791727, this patch will extend the RCU with the required db object for OAC component.

3. Install patch # 18718889, this weblogic patch is required for weblogic server to address bug related to the failure of the web service session management.

4. Install patch # 19721053, this patch is need for installing jdeveloper 12c plug-in to connect to OER and OAC repository.

5. Run RCU to create OER and OAC db schema.

6. Extend current domain with OAC manage server to host OAC application.

High Level to register a Service

Once API Catalogue is installed successfully there are two ways to harvest (register) APIs into OAC.

  • Using Out-Of-The-Box API harvester tool-sets. This approach is prescribed when services are hosted in Oracle SOA Suite or Oracle Service Bus.
  • Using command line harvesting utility This approach is best prescribed when harvesting service base not form Oracle SOA Suite or Oracle Service Bus. Any services defined by a WSDL or WADL can be harvested using this approach.

Detailed Installation Step:

Install oer_generic.jar

Run RCU to create OER and OAC schema objects

Extend existing domain with OAC Manage Server

Select API Catalogue template (Note : don’t select Oracle API Catalogue and Oracle Enterprise Repository template together)

Create oac_server1

Logging to http://<your host>:<oac port>/oac for OAC Dashboard

For installing OAC plug-in in jdeveloper 12c , install patch # 19721053 using opatch utility.

Harvesting Step:

Using command line utility to harvest WSDL base Oracle Service Bus Proxy Service.

High level steps

  1. Edit HarvesterSetting.xml file.
  2. After providing default password.
  3. Encrypt the HarvesterSetting.xml.
  4. Run script.

Detailed Steps

Edit HarvesterSettings.xml , change the default password value.

After changing the default password in the HarvesterSetting.xml, encrypt the password using the following command

The following code snippet shows how to harvest a simple WSDL using script.

 OAC dashboard after harvesting

After adding API meta-data for the harvest service

Starting with SOA12c, the installation process has been changed.

In SOA12c, Jdeveloper (SOA Suite 12c IDE) is shipped with the SOA suite installer with all its plug-in pre-installed, there is no need for installing SOA composite plug-in separately. Also most of the SOA development can be tested on the integrated weblogic which get installed with the Jdeveloper (with few simple steps).

In this blog I will walk you through the installation steps for SOA Suite 12c.

  1. To download SOA12c Installer, follow the below instruction:

    Open this link: in your browser. Accept the License Agreement .

    There are two separate SOA12c Installers are available on OTN (Oracle Technology Network), select the appropriate SOA12c Installer.  Microsoft Windows 64bit JVM installer for Windows environment. Generic 64bit JVM  for all others environments.

    Download SOA Suite 12.1.3, from the “Download” link. Once you download zip , you will find 2 separate jar file upon unzip.

    JDK Version: SOA Suite 12c required JDK 7 u15 or above. It’s extremely important to have correct JDK installed before starting the installation step. Get the latest JDK from oracle website.

  2. To run SOA12c Installer downloaded from the previous step, follow the below steps:

    Open windows command prompt as Administrator.

    NOTE: Make sure you run the command prompt as Administrator . Otherwise most likely you will land up will land up with the following error.

    Validate the JDK version. Your JDK version should be more JDK 1.7.0_15 or above.  Here you can find Older JDK version  -> 

  3. Go to the unzip location run the jar file as run the jar file as   <java_home>/bin/java -jar soa_quickstart_generic.jar   (you don’t need to run the second jar soa_quickstart_generic2.jar)
  4. wait for file to get extracted.

    Provide Oracle Home location

    Wait for prerequisite check to complete.

    Click on “Install” button to install SOA12c

    Uncheck the check-box “Start Jdeveloper with Default Settings“.

    NOTE : Don’t start the Jdeveloper with default setting after you install SOA12c.

  5. Start Jdeveloper from command line. (MW_HOME = the location define in the Step 4.)
  6. Select Role as Studio Developer (All Features)
  7. Go to “Application Server” panel.  Hint: Window> Application Server.
  8. Create default Domain

  9. Enter Domain Configuration, and click on OK
     AdministratorID: weblogic (don’t change it) /Password: welcome1 (set password as welcome1)
    Listen Port: <All Available Address> (Make sure this one is checked)
    Listen Port: 7101
    SSL Listen Port: 7102


  10. Wait for domain creation completion.
  11. Start integrated weblogic server instance
  12. Wait for server to start up.

  13. Once the server start up successfully under Application Server window if you expand IntegratedWeblogicServer you should be able to see both SOA and Service Bus.

Starting with BPM PS5 FP, the steps for creating BAM reports for BPM process analytic has been CHANGED. If you are still flowing the old process from BPM PS4 there is a good change that you will end up with following error

Exception: oracle.bam.adc.common.exceptions.UniqueConstraintViolationException: BAM-01273: Active Data Cache unique constraint violation.

Form BPM PS5 FP onwards, there is no need to run monitoring express installation script ($SOA_HOME/bam/samples/bam/monitoringexpress/bin/ for configuring BAM for BPM. If you have run monitoring express script then errors occur as SYSITERINDEX BAM database table that store index information for each data object you create throws Unique Constraint as BPM tries to create data object which are already created by Monitor Express script.

To overcome this – delete all data object (INTERVAL, COUNTER and COMPONENT) from BAM Console -> Architect ->Sample > Monitor Express. Undeploy your BPM process – redeploy your BPM process after restarting your SOA and BAM servers.

For those you are trying for the first time, follow the below steps.


Configure your BAM Adapter.

Login to your domain weblogic console http://hostname:admin-port/console as administrator weblogic/welcome1.

go to Deployments -> BAM Adapter -> Configurations -> Outbound Connection Pool


Figure 1: Click on Oracle BAM Adapter

Figure 2: Click in the + sign to expand oracle.bam.adapter.adc.soap.SOAPConnectionFactory

Figure 3:Click on esi/bam/soap

Figure 4: Enter HostName,PortNumber, UserName and Password (NOTE : Hit Enter after typing each value, remember to Save your changes.)

Figure 5: Select OracleBAMAdapter

Figure 6: Click on Update Button from the top menu

Figure 7: Select Redeploy option and Hit on Finish.


Configure your BPM Engine.

Login to your domain em console http://hostname:admin-port/em as administrator weblogic/welcome1.

Expand to Weblogic Domain -> your domain name -> soa_server1

Go to System MBean Browser

Expand    Expand Server: soa_server1  Expand BPMNConfig. Click on the bpmn entry.

Set Value of DisableActions to empty as shown below

Configure BPM Project for BAM

Open the BPM Project in JDeveloper.

Navigate to the BPM Project Navigator panel.

Right-click on the project and select Project Preferences.

In the Data Targets tab, select Enable BAM and Enable Cubes as a data target for process analytics

In the Data Targets tab, select Enable BAM and Enable Cubes as a data target for process analytics

Select eis/bam/soap as the BAM adapter JNDI name.

Specify Data Object Path you can specify any value here not necessarily /Samples/Monitor Express.

Deploy the Project.

Verify BAM data Object

Login to BAM console http://host-name: bam-port/OracleBAM (NOTE: make sure you open this URL only in IE8 or IE9.) Or refer if you eant to open in other browsers.

Select Architect Role

Look under Data Object > Sample > Monitor Express folder (Note : if you have mentioned any other location in step 4.7 then look under that folder)

You should be able to see minimum four (4) object, BI_DEFAULT_<CompositeName>_ProcessName and COMPONENT, COUNTER and INTERVAL.


Configure BAM dashboard.

Login to Active Studio for configuring BAM Dashboards.

Click on Shared Reports tab.

Click on Create a New Report button.

Select the template with two horizontal sections.

Click on Click to add a report title and enter Request Quote Dashboard.

Click on 3D Bar Chart.

In Choose Data Object tab, drill down in to Data Objects, Samples, Monitor Express, and select BI_default_bamdemo_SaleQuotedemo

In Choose Data Object tab, drill down in to Data Objects, Samples, Monitor Express, and select BI_default_bamdemo_SaleQuotedemo

Click on Next.

In Choose Data Fields, Group by: METRIC_RANGE_revenueDimension and METRIC_industry. Chart values: METRIC_discount and Summary function(s): Average.

Click on Next.

Select Change View Properties and enter View title: Discounts by Revenue and Industry, Vertical axis label: Discount%, Click on Apply to see your changes.

If you want to change default order of grouping on the X-axis, then click on Data and go to the Fields tab. Use the blue arrows in the Group By column to re-arrange if required , Click on Apply to apply the changes.

Specify a filter so that any orders with revenue as 0 are not shown in the dashboard (these are the orders at activation, before any data is entered).

Click on OK:

Now Click on the Range Gauge as shown below.




In Choose Data Fields, Select METRIC_discount and
Average from the bottom picklist as shown below it

In Choose Data Fields, Select METRIC_discount and Average from the below picklist as shown below it.


Click on Save icon.
Save the report.


View your BAM Report

Select Active Viewer

Click on Select Report

Select Request Quote Dashboard.

Select Request Quote Dashboard.



As a code reviewer I have reviewed number of OSB projects. In most of the projects, I have seen some common mistakes repeated which push me to write this blog.

Top 10 things that one should avoid in OSB 


DON’T try to develop your entire solution only on OSB: OSB is not alone it’s a part of Oracle SOA Suite, though it’s a general misconception since it’s available as a separate installer through OTN. Some Project makes this very fundamental mistake by developing their entire solution on OSB. They try to create everything from Error Handler, to asynchronous transactions, to Retry Logic in OSB resulting in a BIG CHAOS.
OSB is an ESB product it should be only use to develop ESB components.


DON’T design statefull transactions within OSB: OSB is a stateless product it’s not design to handle state-full transactions. For state-full transaction one should use BPEL or BPM instead of OSB.


DON’T use OSB to execute complex SQL, SQL Procedures: Though OSB provide mechanism to execute SQL and SQL procedure within its pipeline but it needs to be restricted only for retrieve (select) operation. NEVER try to execute SQL procedure or insert statements within OSB pipeline.
OSB’s fn: bea: execute-sql() function for querying database tables generally expects the response as a record count and hence when its use for INSERT/UPDATE/DELETE operations it generates an error in the OSB pipeline flow. These errors results in false alerts and can confuse sys admin(s).


DON’T use java callouts to meet your business requirements: Java callout is the most abused feature of OSB. Whichever business logic can’t be achieved through OSB put that in a static method and use it through java callout. WRONG. Java callout should not be use to implement complex business logic within OSB pipeline.


DON’T develop complex business logic within OSB’s message pipeline: Considering the facts that it can be change easily at runtime from sbconsole I have seen project developing business logic in OSB. Oracle SOA Suite has OBR (Oracle Business Rule) component to define business logic than why to define business rules somewhere else (OSB). Define you business rule in OBR expose it as web service and consume your business rule web service in OSB.


DON’T use sbconsole for development: Before OSB, in ALSB days there was no IDE support. “Sbconsole is relic.
OEPE create OSB projects and its components in local file system, which can be easily source controlled apart from that, while considering OSB development OEPE has many advantage over sbconsole like Xquery editor , split-join , etc.


DON’T’ use WS Policy for Security: To implement security around OSB Service use OWSM (Oracle Web Service Manager), weblogic policy is out-dated.


DON’T develop entire message flow with single stage: This is a common practice malpractice of clubbing irreverent actions into a single stage with stage names that hardly means anything.
Each stage should have only relevant actions and the stage name should clearly explain what that stage does for other to understand without going through each and every action in that stage.


DON’T process large file through OSB: OSB is not meant for heavy lifting; one should use ODI for processing large files.


DON’T use wildcard xpaths: Avoid using wild card character * or recursive xpath path operator “//” in Xpath expression. These cause significant performance hit , avoid them as much as you can.