New Features of IBM BPM v8.6

Hello All - it is been quite a while. Its good to be back.

In this post, lets see what are the new features that latest version of IBM BPM (IBM BPM v8.6) brings to the table (Of course for those who doesn't know already).

Application development

  • Use Java 8 on WebSphere Application Server
  • Use the latest technology to create content management user interfaces
  • Determine artifact usage across toolkits
  • Build a custom deployment service flow
  • Convert your coach-based UIs to use the state-of-the-art coach views from the BPM UI  toolkit (SPARK UI Toolkit)
  • Author and edit user attribute definitions in the web Process Designer
  • Author and edit exposed process values (EPVs) in the web Process Designer
  • Author and edit governance processes in the web Process Designer
  • Call Advanced Integration Services from a process or service flow in the web Process Designer
  • Easily identify possible problems by using new metrics with IBM Cloud Product        Insights
  • Integrate with external services by using IBM App Connect
  • Capture IBM BPM events for external use
  • Claim tasks that were implemented by using an external user interface
  • Experience improved performance in Process Portal when you have access to a large number of saved searches.
  • Configure custom JDBC driver paths
  • Migrate process instances individually by using the new JavaScript API
  • Pause and resume Event Manager by using a new REST API

Admin

  • Export saved searches from Process Federation Server
  • Experience improved performance of indexers
  • Specify a duration between requests to federated IBM BPM systems to refresh cached saved search metadata
That's all for now. See you soon with more post.
Share:

Bootstrap CSS with IBM BPM Coaches



Many of us are aware of what bootstrap is and how that can help in creating a responsive UI that will adjust the UI layout based on the device in which the screen is opened. In this post let us look at how to build a near responsive UI with stock coach components using bootstrap. The idea is to exploit the bootstrap’s concept of dividing the screen in to twelve columns to adjust the layout automatically based on the screen resolution.
Before going further, the first thing that needs to be done is download the bootstrap CSS and import that as a managed web file in to your toolkit / process app.
 
Now we will have to create several containers such as rows /columns that uses the bootstrap CSS as shown below. These columns are key to the responsiveness of the UI when the screen/browser resolution is changed.

Share:

How to initiate task for ad-hoc activitites in BPD of IBM BPM

We all know that we can create an ad-hoc task in an instance from the instance view of process portal. I have come across a scenario where I need to invoke an ad-hoc activity in the BPD programmatically instead of from instance view. After some research I found these two options using which we create an ad-hoc task for an ad-hoc activity in the BPD.
1. Using Rest API methods
2. Using js API (System API) from server script

In this post, let us look at system API method for invoking ad-hoc activity with name "Adhoc Update Request", which is created as a sub process in the BPD.

Before we start, we need to add Dashboards Toolkit to the Process Apps, as some of the object that we use is available in this toolkit.

    tw.local.instanceId="1000";
    tw.local.activityName="Adhoc  Update Request";
    var activityListFilter=new tw.object.ActivityListFilter();
    activityListFilter.executionStateFilter=new Array("READY");
    activityListFilter.activityTypeFilter=new Array("SUB_PROCESS");
   
    var properties=new tw.object.ActivityListProperties();
    properties.filters=new tw.object.listOf.ActivityListFilter();
    properties.filters.insertIntoList(0, activityListFilter);
     
    var instance=tw.system.findProcessInstanceByID(tw.local.instanceId);
    var activities=instance.retrieveActivityList(properties, 100, 0, false).activities;
     
    for(var i=0; i < activities.listLength; i++){
         if(activities[i].name.indexOf(tw.local.activityName) > -1){
               tw.local.activityId= activities[i].id;
         }
    }
   

    tw.system.findActivityInstanceByID(tw.local.activityId).start();



This will initiate a task for the ad-hoc Activity in the given process instance.

For more options on the above script, go through the below url:
 http://www.ibm.com/support/knowledgecenter/SSFTDH_8.5.5/com.ibm.wbpm.ref.doc/ae/doc/JSAPI.html


Thanks for reading the post !!


Share:

com.ibm.websphere.ssl.SSLException: Cannot get security object from WCCM during WebSphere Application Server starting

I have come across this issue while starting my IBM BPM server. It says:

An error occurred initializing, nodeagent [class com.ibm.ws.runtime.component.ServerImpl]
com.ibm.ws.exception.ConfigurationError: com.ibm.websphere.ssl.SSLException: Cannot get security object from WCCM.

    at com.ibm.ws.ssl.core.SSLComponentImpl.initialize(SSLComponentImpl.java:208)
    at com.ibm.ws.runtime.component.ContainerHelper.initWsComponent(ContainerHelper.java:1193)

.
.
.
.
Caused by: com.ibm.websphere.ssl.SSLException: Cannot get security object from WCCM.
    at com.ibm.ws.ssl.config.SSLConfigManager.initializeServerSSL(SSLConfigManager.java:215)
    at com.ibm.ws.ssl.core.SSLComponentImpl.initialize(SSLComponentImpl.java:145)
    ... 36 more


After some research on this I found the resolution for the same and thought of sharing that with you all.

The reason behind this could be the courrupted security.xml which could be found at the below location : \profiles\<<profileName>>\config\cells\<<cellName>>\security.xml
Now don't ask me how this got corrupted :) .

This can be resolved in two ways:
First one being : get the file from a backup copy (if you have one).
Second way:  the same file could be copied from another profile in the cell, e.g.: ...\profiles\Profile2\config\cells\PCCell2\security.xml or get this file from another working copy of the installation and replace it with the corrupted file.

Once you replace the corrupted file , try to restart the server and it should work. (Atleast you should not see this error and it worked for me).

Thanks for stopping by !!!
Share:

How to find timeZone offset between two timezones in IBM BPM

Many a time during our development, we need to calculate the time zone offset (time difference) between two different time zones during the date manipulations. In this Post, I would like provide a simple function which will give the time Difference between two Time Zones.


function getTimeZoneOffset(zone1,zone2){
    var date=new TWDate();
    var dateString=date.format("MM/dd/yyyy HH:mm.ss");
    var Zone1Date=new TWDate();
    var Zone2Date=new TWDate();
    Zone1Date.parse(dateString, "MM/dd/yyyy HH:mm.ss", zone1);
    Zone2Date.parse(dateString, "MM/dd/yyyy HH:mm.ss", zone2);
    var offset= Math.ceil((Zone1Date.getTime()-Zone2Date.getTime())/(60*60));
    return offset;
}


Note: The above method ve offset in hours

This method can be used as below;

var offSet1=getTimeZoneOffset("EST","GMT") 
var offSet2=getTimeZoneOffset("GMT","EST")

Output:
offset1 is evaluated to '5' 
offset2 is evaluated to '-5'  
Share:

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 ?

Share:

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

Share:

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.

Share:

Working with Reg Ex in IBM BPM

In this post, let us look at some of the commonly used server side data validations using the regular expressions and how to use them with the BPM variables. I am providing ready use methods for some of the commonly used Reg Ex validations in this post just for your reference for future use when ever required.

Reg.Ex for Email Id 

/*  This method will verify if the input string is a valid email Id or not and return true for valid email and false for invalid email */ 
function isEmail(str){
     if(str!=null && str!=""){
        var emailRegEx=/^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$/g;
         return str.match(emailRegEx);
     }else{
         return false;
     }
}


Reg.Ex for URL

/*  This method will verify if the input string is a valid url or not and return true for valid url and false for invalid url */
function isGoodUrl(str) {
    var regEx=/(^|\s)((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/gi;
    if(str!=null && str!=""){       
                    return str.match(regEx);
        }else{
                   return false;
    }
}

Reg.Ex for trimming of trailing spaces

/*  This method will verify if the input string is a valid email Id or not and return true for valid email and false for invalid email */
function trim(str){
       if(str!=null){
                 return str.replace(/^\s+|\s+$/, '');
      }else{
                 return "";
     }
}

Having defined these methods in the either js file which is added as server file in File section in PD and can be used globally across the application or these can be defined locally in a server script and can be invoked at that server script level as below.

For trim:  tw.local.str = trim(tw.local.str);
For URL: tw.local.isURL= isGoodUrl(tw.local.url)
For Email : tw.local.isEmail= isEmail(tw.local.emailId)
  
Hope this post is helpful !!
Share:

working with documents in IBM BPM

Document upload and download is one of the import use case in the BPM processing. In this post let us look at how to upload a document from the process instance during the process and retrieve the documents corresponding to a given process instance in a standalone human service? What is mechanism used to store the documents in IBM BPM.

In IBM BPM documents are stored using a document store (Out of Box ECM) provided by IBM BPM. It is also possible to connect to an external ECM from IBM BPM. IBPM suite provides a toolkit out of box called Content Management Toolkit which contain some predefined services and coach view to upload and access the documents to and from the IBM BPM document store. The coach view Document List can be used to upload the documents to IBPM document store or for that matter to any External ECM system which is CMIS compliant. In this post let us look at how to upload the documents to IBPM document store from process instance and associate those documents with some unique parameters such as process instance Id and retrieve them in a standalone screen based on the document parameter ( In this case let us use instance Id as document parameter). Below image shows the image of Document List Coach View from Content Management Toolkit. 

Share:

Confirmation Dialog on Click of a Button in IBM BPM

In most of the UI applications, display of confirmation dialog when trying to delete some data or cancel the current operation is a very common use case. In this post, let see how to create a coach view with a button which will do this. Below Image shows the confirmation dialog on click of the Delete button.

Confirmation Dialog on Click of Delete Button

Share:

Confirmation Dialog Coach View in IBM BPM

Display of Confirmation dialog is one of the very common use cases in any UI based application in such as "delete" operation, "cancel" operation etc. In this post let us see how to create a coach view which can used to display a confirmation dialog as shown below.

Confirmation Dialog
Figure 1

Share:

How to assign a Team or User to an activity dynamically in IBM BPM

From IBM BPM v8.5, the Assignment options which were there before such as "Last User in the lane", "Routing Policy",  "List Of Users" and "Custom" were deprecated an can no longer be used for the Task Assignments. In older version the option "Custom" was being used for dynamic assignment of Team or User to a Task. In the latest versions of IBM BPM i.e., from V 8.5.0 a new way of assignment has been introduced i.e., using the "Team Filter Service".

In this post, let us look at a code sample illustrating the Dynamic task assignment for user using Team Filter Service.

As a first step create a simple BPD with one Activity with a Human Service. Click on the activity and navigate to Properties --> Assignments and click on new in-front of  "Team Filter Service" to create a new Integration service (team filter service) as shown in below figure or select an already created service.


Share:

How to use server side variable in custom html script of IBM BPM Coach

In this post, let us look at how display the value from a server side variable on a coach using custom html.

In older versions of IBM BPM i.e., before v8.0 it is easier to both bind a server side variable and access value of server side to a custom html using the syntax tw#local#variable using which a variable can be bound to any input control of the custom html which enables us to get or set the value to or from the variable.
But starting from the v8.0 after the introduction of new coaches and coach view, the above syntax no longer works and it is also not possible to set the value to a server side variable directly from the input control but it is possible to get the value using the below syntax.

Directly in coach :
{{tw.local.variable}}    

In Coach view :
 To Access business Data variable:
     {{tw.businessData.variable}}

 To Access configuration variable:
     {{tw.options.variable}}

Share:

Key Differences between IBM BPM Process Management & Case Management

IBM Business Process manager (BPM) advanced v8.5.5 is now offering basic Case management in its BPM Suite. The basic case management solution is derived from one of the IBM’s offerings called “Case Manager”. It also includes an embedded content repository whose usage is restricted to support the basic case management documents &amp; folders. The restricted use of this content repository can be extended to support unlimited content management use cases with IBM ECM.

Key Differences between Process Management & Case Management

Below are some of the key differences between business process management and case management.

Share:

Working with JSON in IBM BPM

Now a days REST protocol has become very popular for interaction between various system. REST services support both json as well as xml as i/o. In this post, I would like to illustrate with an example on how to parse the json response / json object to retrieve the data and assign it to a tw variable by using json2.js file.
Let us first attach the file json2.js to the files sections under server files as shown below.

Figure 1

Share:

Performing REST Call from IBM BPM server Script

IBM BPM provide a connector "read from http" in system toolkit to invoke the REST service call. This connector supports both get and post methods while invoking the REST Service. But the disadvantage with this is that it will support only when the input is in the form of either query parameters or form parameters, but not when the input has to be sent as Entity to the REST service.
  
In this Post, I would like to illustrate an example on how to perform a rest call which where the input has to be passed an entity  instead of name and value as illustrated in my other post.

Below is the xml input which has to be passed to the rest service. let us use a server scriptlet to bind this input xml to the variable tw.local.inputString.


Input:



<Reqest><control>420131</control><suffix>10</suffix> <account>1</account><planData><planNumber>21</planNumber><planEffectiveDate>2014-01-10</planEffectiveDate></planData></Request>

Below code can be to invoke the rest service by passing the necessary input to the service call. 


var client =new Packages.org.apache.http.impl.client.DefaultHttpClient();

var input =new Packages.org.apache.http.entity.StringEntity(tw.local.inputString);
input.setContentType("application/xml");
var post = new Packages.org.apache.http.client.methods.HttpPost(tw.local.restserviceurl);
post.setEntity(input);
var response = client.execute(post);
//var entity = response.getEntity();
tw.local.output = Packages.org.apache.http.util.EntityUtils.toString(response.getEntity(),"");


Below shown is the xml output the above response, which is in String format.



<Response>   <getCount>    <planNumber>21</planNumber>
    <planEffectiveDate>2014-01-10</planEffectiveDate>     <subscribers>0</subscribers>     <members>0</members>  </getCount>   <getCount>    <planNumber>0</planNumber>    <planEffectiveDate />    <subscribers>0</subscribers>    <members>0</members>  </getCount>  </Response>

After getting the response as a string, you can convert that to XML as below:

tw.local.response = Packages.com.lombardisoftware.core.XMLUtilities.stringToElement(tw.local.output);

you can also refer the post on how to convert XML string to XML.

Hope this post is usefull !!!

Thanks for stopping by. If you like this post leave a comment, share it and do a g +1.
Share:

Server side Caching in IBM BPM with jsCache

Many of us might come across this requirement of server side caching mechanism in IBM BPM, especially when the applications are UI heavy, involves lots of users or expensive data preparations. In these kinds of scenarios Caching comes to rescue in-terms of improving performance by avoiding expensive operations like database calls or web service calls to fetch the commonly used or rather static data (which doesn't change more often) that needs to be displayed on to the UI. In IBM BPM, there is beautiful option for this called jsCache.
How jsCache works? 
jsCache stores data server side as mutli-level javascript Map (Key-value pair), with the first level being the name of the cache and map of the values to be stored corresponding to that cache name. Each data key in a given cache can be associated with an expiry time (optional though), so that the cached data can be refreshed at regular intervals of time. Figure 1 helps illustrate the storage of data in jsCache,

Figure 1: illustration of jsCache
You can download the jsCache.js file  by clicking here.

Share:

IBM BPM Coach Validation with Multiple Buttons

In this post, I would like discuss about an issue with Coach Validation when there are multiple button validations available in a single Coach and possible solution for the same.

First let me describe the issue.
I have a coach which has three buttons, Button1, Button2, Button3. On click of each button, field validation should happen for the fields corresponding to each button. you can go through my other post related to UI Validation to understand on how to do validation in IBM BPM.
In the below image, 'tick' mark for each transaction (line) indicates that validation should be performed on click of that particular button. Unfortunately, even though validations has to be performed for multiple buttons, all the validations should be handled in a single Validation Script (you can notice in the Figure 1 that there is only one validation Script). In order to validate the fields corresponding a button, we need to identify which button is clicked up on. To identify the button clicked up on, we can bind a Boolean variable to each button  as shown in Figure 2 and on click of the button, the bound variable will be set to true.  In the validation Script, we can verify this button variable (Boolean) and if true, then validate the corresponding fields for a particular button.
Figure 1
Share:

IBM BPM Coach View life cycle

This post will give you a brief description about the life cycle of IBM BPM coach view and helps understand what are the various event handlers available in coach view and high level description of each coach view.



                            

Click here to watch this video in you tube.

Hope this is helpful to understand coach view at high level. 
Share: