Thursday, August 30, 2012

Error Handling for Composite IBM DataPower Services

In general, when it comes to error handling i am a big believer in “Defense in Depth”. I prefer a multi-layered approach in which I try to account for the maximum possible conditions at each layer and eventually have a “catch all” net where I catch and process the errors that ‘slipped through the cracks’.

Let’s take a scenario where we have an orchestration service which is tied to a bunch of back-end proxy services. Each of the back-end proxies is tied to corresponding back-end application.

Below is the logical representation of a complex composite service on IBM DataPower:


Below is a description of the “Happy Path” i.e. the ideal scenario in which there is no error:

  1. The incoming request is received by the ‘Orchestration Service’.
  2. The orchestration service then makes a series of calls to the various back-end proxies. The request message for each call is dependent on the response messages from the previous calls.
  3. The back-end proxy receives the message and in turn calls the back-end application.
  4. The back-end application processes the message and replies with a response message.
  5. The back-end DataPower proxy receives the response, reformats it and forwards it to the orchestration service.
  6. The orchestration service receives the response and reformats it. It then either calls another back-end proxy, or forwards the reformatted message to the calling service.

Below is the description of handling error scenarios or the “unhappy path”.

Following are the various types of errors that we have to contend with:

  1. Errors occurring in the back-end applications: These errors occur when the back-end application is able to successfully receive the request message from the DataPower proxy, but is unable to process it. This condition results in DataPower receiving a fault/error message from the back-end application
  2. Errors occurring in the DataPower back-end proxy: These errors occur when the back-end DataPower proxy receives the request message successfully but is unable to process it. This results in the back-end DataPower proxy returning a fault/error message to the orchestration service.
  3. Errors occurring in the DataPower orchestration service: These errors occur when the DataPower orchestration service receives the request message successfully but is unable to process it. This results in the DataPower orchestration service returning a fault/error message to the front-end calling service.
With that in mind, following is my preferred approach for complex composite DataPower services:

Errors occurring in the back-end applications:
The orchestration service checks if the response from the back-end proxy is a soap:fault, and it if is then it might decide to rollback any of the previous calls (like an adduser or a insert DB row) with another call(like deleteuser or delete DB row).

You can use the dp:url extension to do this:


These errors come back as soap:Fault messages with HTTP Response code ‘500 Fail’. Generate a custom error message which includes the following fields (at least):

  • Error Code service variable
  • Error Details service variable
  • Timestamp service variable
  • MsgId/UUID response payload

Now, convert the HTTP Response Code from ‘500 Fail’ to ‘200 OK’:


We convert the HTTP Response Code from 500 to200 so that the orchestration service treats the soap:fault message as a valid response instead of an error.

Errors occurring in the back-end DataPower Proxies: Such errors can be caught and processed by using a combination of the On-Error action with the Error Rule in the back-end proxy’s policy.



The error rule can be configured to generate a custom fault/error message with HTTP response Code set to “200 OK”.

Errors occurring in the Orchestration service: Again, such errors can be caught and processed by using a combination of the On-Error action with the Error Rule in the orchestration service’s policy. We send back the error message with a HTTP Response code of “500 Fail” to the front-end calling service.

Prithvi Srinivasan is a Technology Manager at Prolifics and has extensive expertise in the IBM WebSphere suite of products. He has played a key role at several strategic clients by providing technical leadership. Prithvi has an extensive background in the design and development of SOA and Integration solutions, with a proven track record of consulting and architecting solutions for several industry verticals like Banking, Finance, Retail, Insurance, HealthCare and Technology.

Monday, June 25, 2012

ILOG Integration with Process Designer (IBM BPM 7.5.1)

Some information I gathered on best practice of ILOG Integration with Process Designer (IBM BPM 7.5.1):



Connecting JRules directly from IBM BPM Via Webservice-SOAP connector:

Just want to add that this is not a best practice, but a nice description of one way to integrate BPM 7.5.1 with JRules. There are multiple factors that impact the integration pattern. You always have to consider the information model in scope for the rules, that is far different from the model for the process. So the BPD will most likely not be able to send all the data to JRules. There is always a middle man, service, responsible to populate the data graph needed for the rule processing. With BPM Advance this could be a SCA component integrated as Advance Integration Service, in BPM Standard a java component exposed as web service and consumed as such within the BPD.



JRules connector directly in IBM BPM

The goal of embedding the ILOG rule editor inside IBM BPM is to provide a much simpler way to modify the behavior of the processes. Those rules live within the process and as such a new version of the process needs to be redeployed every time a rule needs to be changed.



SOA Best Approach:

The SOA based approach for Business Process Management suggests the options as below:

  1. Blueworks Live -> Business Process Manager

  2. ILOG(create Business rules) -> Websphere Integration Developer -> Process Server



Identify the Hosted Transparent Decision Service (HTDS) interface
.
Create an SCA library for HTDS WSDL. 

Defines a mediation module for the interface mapping. 


Joel Krishnan, a Solution Architect for Prolifics, has over 9+ years of IT experience and has worked in many customers implementing technology solutions across multiple business verticals.He is specialized in IBM BPM specifically in ProcessDesigner.He has extensive experince in Architecture/Design and Devopment of IBM BPM.He is also certified in IBM BPM. Joel received his BE in Electrical Engineering in 2002.

Wednesday, June 6, 2012

How to Delete Process Applications from IBM BPM 7.5.1

As a new feature of the Business Process Manager V7.5.1 platform, process applications can now be deleted from the repository. In the previous version of BPM, version 7.5.0 & 7.5.0.1, users could only archive snapshots within a process application. This did not remove the application; rather it was merely hidden from the default view and it was still stored in the repository and the database.

In the latest version of BPM, users can now actually delete the process application, and in turn, delete all snapshots and instances tied to that application, including deletion of these entries from the database.

To delete a process application, click on the process application that you want to delete and then click on Manage.


Next, click on Archive Process App and click on Archive.


Click on the Process Apps tab of Process Center and then click on Archived.


Click on the process app that you previously archived and select Delete Process App, click on Delete.


If you then return to the Process Apps tab in Process center, you will notice that the process app no longer appears in the list.

We can actually confirm that all database entries are also removed as part of the process app deletion. Here we can see that the entry for our application named TestApplication was added to the BPMDB in the table LSW_PROJECT.


After deleting the process app, this entry is no longer present in the table. If the application contained snapshots and BPDs, these entries would also be removed from the LSW_SNAPSHOT and LSW_BPD tables respectively.

Please keep in mind, that this cleanup only happens in Process Center. Currently, the product does not have the capaibility to clean up these components on the Process Server side. However, this is an important new feature to help keep your Process Center repository clean and its database clean and efficient.

Seth Gagnon, a Senior Consultant for Prolifics, has over eight years experience in the healthcare industry and has worked with business process management technology to automate member enrollment and claim adjudication for a Fortune 200 healthcare client. He has experience in IBM middleware products such as WebSphere Application Server, WebSphere Process Server, WebSphere Business Process Manager, and other products in the IBM BPM stack. Seth received his BS in Management Information Systems from the University of CT and his MS in Technology Commercialization from Northeastern University.

Thursday, May 31, 2012

Leveraging IBM Rational to Manage your WebSphere Environment

We’re gearing up for another exciting Innovate 2012 conference in Orlando this year, having just come back from presenting at the IBM Impact conference in Las Vegas. The great thing about these conferences is they give Prolifics the opportunity to share stories and lessons learned with customers old and new – and lets us bring a number of our customers together so they can swap ideas amongst themselves.

Over the last year, since Innovate 2011 conference, Prolifics has helped a number of our WebSphere customers improve their configuration and release management processes through a combination of good practices and IBM Rational tooling. We’ve seen weaknesses in these areas be a major drag on otherwise technically sound development projects – and helping both our own as well as our customers’ teams improve in these areas has been a top priority of my own practice within Prolifics.

In addition to sharing our experiences at IBM Innovate, I am introducing them in this Prolifics whitepaper as well: Leveraging IBM Rational to Manage your WebSphere Environment.

To learn more about my upcoming speaking session at IBM Innovate and Prolifics’ presence at the conference, click here.

 @greg_hodgkinson

Gregory Hodgkinson is the Rational Practice Director at Prolifics (www.prolifics.com). Previous to that he was a Founder, Director, and the SOA Lead at 7irene, a visionary software solutions company in the United Kingdom. He has 16 years of experience in software architecture , initially specializing in the field of component-based development (CBD), then moving seamlessly into service-oriented architecture (SOA). His extended area of expertise is the Software Development Lifecycle (SDLC), and he assists Prolifics and IBM customers in adopting agile development processes and SOA methods. He is still very much a practitioner, and has been responsible for service architectures for a number of FTSE 100 companies. He presents on agile SOA process and methods at both IBM (Rational and WebSphere) and other events, has also co-authored a Redbook on SOA solutions, and contributes to DeveloperWorks.

Friday, May 18, 2012

The Importance of a Focused Mobile Strategy

For the past few years I have been speaking in several conferences about social and mobile solutions for organization for different industry verticals and I am surprised that I still get asked this question. “Does our organization need a dedicated and focused mobile strategy?” I have 2 words. Yes, Yes and Yes. Oh wait that’s 3!

Here is a sampling of stats:
1 billion of the world’s 4+ billion mobiles phones are now Smart Phones
Over 85% of new handsets will have Web access

Usage - What are mobile users doing:
95% send or receive text messages
65% access the internet on their mobile device
48% have accessed a social networking site on their phone
20% have purchased something or charitable donation their mobile phones

Social Impact
Over 1/3 of Facebook’s 600million + user base uses Facebook Mobile
Twitter has 165million users and 50% of them us Twitter Mobile
A whopping 200million + Youtube views occur on mobile devices per day
Not my research!! Women aged 35 - 54 are the most active group in mobile socialization

Traditionally we are used to accessing information via desktop and mobile web browser (more like WAP)


Then came the wonder of Apps. The app revolution got developers to build native apps using C# or objective C or vendor approved programming language.


But the tide is really riding on the app revolution where the next generation of apps are a combination of apps called Hybrid apps. Which is a combination of native code and open html framework.



The different kinds of apps presented great opportunity to exploit the ways developers can present their data. But it also presented a significant challenge. The need for a common toolset, which can provide a platform to develop these mobile apps and an overall strategy. Q1 2012 IBM acquired Worklight to enhance their mobile arsenal. Worklight, offers an open platform that helps speed the delivery of existing and new mobile applications to multiple devices. Essentially it gives a great platform to develop all service level mobile applications.


I wont go in details of the product but here is a quick overview of IBM Worklight


Worklight and iPad
While working for our customers on the mobile app development using the Worklight, a colleague of mine (@VishSinha) had to create to have Split view layout for tablets specifically iPad. There are several ways to achieve it but the need was to create a unified User Experience that is seamless if accessed via non-tablet devices. So he decided to use jquery mobile Split view plugin for IBM Worklight, to achieve the split view look and feel for iPad version of app. Here is a quick approach to it.

Two Panel Split View Layout
To build a two-panel layout, called menu (left navigational links) and main (contents) panels for iPad, there are two divs inside the body tag of the main App.html page. Menu div panel is mainly responsible for handling all the navigation links on the left hand side and main div panel is mainly for rendering/loading the contents on the right side of the screen once user clicks on the left side navigational links.

Here is a preview of the Prolifics homepage of the iPad Split View:



The HTML code for the menu div panel looks like this:


The point being, everyone knows mobility is very important but it is almost imperative to use a platform for development of mobile devices that can scalable and can support multiple formats of mobile applications.

Sources:
http://www.thefonestuff.com/news/10/Mobile-Phone-Facts-2011.htmlhttp://www.pewinternet.org/Reports/2010/Mobile-Access-2010/Summary-of-Findings.aspx
http://www.worklight.com

Niral Jhaveri is the VP of User Experience at Prolifics and has extensive expertise in the IBM Lotus, WebSphere and Rational family of products. He has played a key role at several strategic clients by providing technical leadership. Niral has an extensive background in the design and development of IBM WebSphere Portal, SOA and Web 2.0 applications with a proven track record of consulting and architecting solutions for several industry verticals like Finance, Retail, Insurance and Technology.

Monday, May 14, 2012

Why Every Organization Needs Its Own Permalink Service

I would recommend to any organization that they create and use their own URL bookmarking service. The benefits of creating and using such a service are many. The most compelling force is that you can create permanent URL's that have no dependency on a particular website version, technology, changes to taxonomy, changes in branding (assuming the URL service remains intact), and the ability to create multiple URL's to the same hypermedia, create vanity URL's, and many many more interesting uses.

Myself being a long time WebSphere Portal guy you might ask; "well isn't the IBM portal's URL mapping and friendly URL services exactly what you're talking about." To that my answer would be; 'Yes, They overlap, but the forces are different.' One of the objectives of such a URL is to remain technology independent and avoid any vendor locking. If you've ever done a major Portal upgrade project or even better a migration from another Portal product you'll quickly realize that you have a big problem whenever asked to maintain inbound links to the old technology or site.

The solution to this challenge is not entirely to use a link service and I won't go into details around what else needs to be done. The basics are that some links "you" company "X" control and others you can't control. The links and bookmarks that you control is the focus of this recommendation. The links you don't control have a laundry list in a project plan:
  • communicate with search engines to get re-indexed quickly after launch
  • contact partners and use site analytics to determine who is linking to you
  • develop a 404 strategy
  • use mod_rewrite or your content router rules
  • continue to evaluate misses on dead links in web analysis reports
  • eventually cut-loose and let the dead links die
So let's focus on the link you do control. The first step is to develop this service. Having done this for a large customer with site of 7 million registered users here are some features to consider:
  • URL shortening
  • Vanity URLs in paths
  • Meaningful terms in the URL
  • a rules engine! (Surprising, but with that you can enforce logic based routing of links, start and expiration times, etc)
  • A must is a nice administrative user interface for creating the link and pointing to the destination
The next and most critical step is to get every communication leaving the organization (and within the organization) using this new service. When marketing sends a link out, believe me you want that link to go to this new service. An aside - years ago I had a customer send an incorrect link out to The WSJ, NY Times and just about every other major news agency about the fantastic site redesign of their public website. It was embarrassing to the company and horrible for I.T. department since they did not have any technical failure in the launch. The URL sent out didn't exist! Had this tool existed for them it would have resolved the issue. You can always change the destination that your link service URL points to. The biggest challenge is getting the organization tuned in to using this new way of linking to the organizations web pages. Many social media and blog sites do a nice job of this by providing a part of the management inline in the pages that can be linked to (e.g. "Link to the Page" icons.) Emails sent out to customers are another big source of dead links whenever a site is overhauled - so update those systems that are generating the emails.

Wikipedia References to Related Concepts:
http://en.wikipedia.org/wiki/Permalink
http://en.wikipedia.org/wiki/URL_shortening

WebSphere and Portal SSL Termination Consideration

Francis recently ran into some issues in an environment with SSL termination at the F5 BigIP content routers. Initially, I thought his issue had to do with how the URL's that had been put into forms and content by the developers for his project. I later realized the issue after he sent me this link: http://www-01.ibm.com/support/docview.wss?uid=swg21221253

It makes perfect sense now. The application server receives requests and determines if the request came in on a secure port (SSL / HTTPS.) This is important in two ways; first the Servlet API and second the Portal's URL generation. The Servlet API has the ServletRequest#isSecure method as well as the ServletRequest#getScheme method. The application servers behind SSL termination points see this as being non-encrypted traffic. Next, Portal URL generation causes an issue since it generates URL for themes and Portlets using this information. When URL's are generated in their full form (absolute URL's) they are generated for non-secure (http) traffic.

One way to try to mitigate the issue is to change the Portal settings in the State Service to use relative URL's. # enables or disables the generation of relative URLs by default if URLs are generated # from tags # this setting can be overridden on a per-tag basis # # Default: false #com.ibm.portal.state.accessors.url.URLContext.enableRelative = false The solution presented in the Technote should be applied in any event since there may be circumstances where relative URL's are either undesirable or not feasible. One setting in the WebSphere Portal asks for traffic to be redirected to secure transport and without the above issues would still occur.

Applying both changes may be the best solution however usage scenarios vary so... test.

Tim Reilly is a Technology Manager with Prolifics. He has led the implementation of many global projects using IBM WebSphere Portal and has extensive background in design and development of enterprise portals. He specializes in providing Enterprise J2EE and Portal solutions leveraging WebSphere Portal, Content Management, Tivoli and 3rd party integrations. He has over 9 years of experience with Websphere Portal and is a former Apache Software Foundation committer.