Wednesday, December 23, 2015

Handling SOAP Fault in IBM BPM webserivce integration

This is one area which most of us including are under the impression that SOAP Faults can not be handled with the web service integration of IBM BPM. It is very much untill the version8.0, but the support has been provided starting from v8.0.1. The link below tells you on high level on how to capture the soap fault using the error event in IBM BPM.
IBM Knowledge Center.

your WSDL operation looks like this, similar to what is shown in the above link.
Operation Element in WSDL (Fig - 1)

What does this link won't tell you and you need to know in order to make this work ?

Tuesday, December 22, 2015

IBM BPM - How to get the Server HostName and Port in different Environments

In this Post, let us look at how to retrieve the Server host name and port in different environments. The general practice is to use an environment variable for host name and port which can be used to hold these constants and change these values when you promote the code to higher environments.
I found a way  to retrieve these values programmatically using  the apis that comes with IBM BPM, just thought of sharing that with you all. Below is script which will fetch these values dynamically.

Packages.com.lombardisoftware.core.config.TWConfiguration.getInstance().getServer();
Above statement gives the instance of the server.

server.getServerHost() - This gives the Host Name of the BPM server.
server.getServerPort() -  This gives the port of the BPM server

Packages.com.lombardisoftware.core.config.TWConfiguration.getInstance().getCommon().getPortalPrefix(); 
Above statement gives the portal prefix

Saturday, December 12, 2015

IBM BPM - Send an Uploaded File as an Attachment in Email

In this post, let us look at how to write a file attached in IBM BPM (to an ECM ) on to the file system and send that file as an attachment in the email Notification.


 Below are the assumptions or Prerequisites for this illustration:
  • BPM uploads the document attachments to an ECM document store.
  • A folder already created and folder id is generated (Of course using the services available in Content management Toolkit !! ) in the ECM for a given application.
Below are the steps involved:
On a high level, this solution can be divided in three parts such that: a) Retrieve the file from content store (ECM), b)Write file to a file system, c) send the email by providing the file location to email service.

Let us look at this solution in details.