Invoking a process deployed in IBM Business Process Manager V7.5 using WebSphere MQ

This article walks you through the steps required to integrate WebSphere® MQ with IBM® Business Process Manager V7.5. The integration is illustrated using a process invoked by a message sent through MQ. This kind of integration may be useful in situations in which a business process needs to be invoked when an event occurs in any disparate system not directly integrable through adapter frameworks, and requires some sort of middleware to exchange data.

Sharad Chandra (schandr1@in.ibm.com), Senior WebSphere Consultant, IBM

Author photoSharad Chandra is a Senior Consultant in IBM PartnerWorld for WebSphere at the IBM India Software Lab. He has expertise in the area of solution development with WebSphere Process Server, WebSphere Lombardi and the SOA suite of products. In his current position, Sharad has worked on several critical engagements involving implementation of scalable and highly available WebSphere infrastructure, solution development, migration, performance tuning and troubleshooting.



Sateesh Balakrishnan (satebala@in.ibm.com), IT Specialist, IBM

Photo of Sateesh BalakrishnanSateesh Balakrishnan is an IT Specialist with IBM Software Services for WebSphere (ISSW). He has over 10 years of experience and is currently working on BPM and BRMS, specializing in WebSphere Lombardi and WebSphere ILOG. In his previous assignment at ISSW, he worked on application infrastructure, with in-depth focus on WebSphere Application Server, J2EE application migrations, and performance troubleshooting and tuning of WebSphere Application Server. He has worked in various capacities at IBM, including design and development of J2EE solutions. His current interests are in BPM and BRMS systems.



18 July 2012

Also available in Chinese Russian

Introduction

IBM Business Process Manager V7.5 is a comprehensive BPM platform giving you visibility and insight to manage to a full enterprise-wide program. IBM Business Process Manager harnesses complexity in a simple environment to break down silos and better meet customer needs.

WebSphere MQ (MQ) enables applications to use message queuing to participate in message-driven processing. Applications can communicate across different platforms by using the appropriate message queuing software products. For example, HP-UX® and z/OS® applications can communicate through WebSphere MQ for HP-UX and WebSphere MQ for z/OS, respectively. The applications are shielded from the mechanics of the underlying communications.

This article shows an integration scenario between MQ and a business process application deployed on Business Process Manager. The type of integration described in this article could be useful in situations in which a business process needs to be invoked when an event occurs in any disparate system not directly integrable through adapter frameworks, and requires some sort of middleware to exchange data.

The download provided with the article contains a message-driven bean (MDB) application that receives a message from MQ and forwards it to the business process application. For details on implementing the application, refer to A practical approach to integrating JMS and IBM Business Process Manager.

Application architecture

The process application used in this article consists of two primary components: a business process application developed in Process Designer and a J2EE™ application containing an MDB that acts as a bridge between MQ and the business process deployed on Business Process Manager. The activation specification of the MDB can be associated with the MQ queue or a listener port in WebSphere Application Server, if desired.

As shown in Figure 1, the data comes in CSV format from MQ to the MDB, which transforms it into the message format understandable by the Business Process Manager Undercover Agent (UCA) which further invokes the process.

Figure 1. Application flow architecture
Application flow architecture

Message transformation in the MDB

The MDB onMessage method receives the CSV data in the a form of byteMessage, which is then tokenized and converted into a String array. The data is then fetched form this String array and transformed into the XML message structure understood by the UCA.

Figure 2. Message conversion
Message conversion

Application integration

To integrate the Business Process Manager application with an external MQ provider, you need to create an MQ client link in the underlying WebSphere Application Server of Business Prcess Manager, using either a Service Integration Bus (SIBus) channel or a MQ provider. This is an important step because WebSphere Application Server acts as both client and server to the external MQ provider. This configuration creates a bridge between the process deployed on Business Process Manager and MQ.

Business process application architecture

The business process application contains a human task consisting of a Coach that displays the information received from MQ. This human task interacts with the message event, which in turn is associated with the UCA. The UCA service receives the data from the MDB through its default queue in a standard format and forwards it to the task. Figure 3 shows the high-level configuration details of the business process application.

Figure 3. Business process application configuration
Business process application configuration

MQ message structure

In this article, we'll use a CSV payload to MQ. The CSV data is kept in a text file, as shown in Figure 4, which is then pushed to MQ using RFHUtil.

Figure 4. CSV file
CSV file

Step 1: Configure MQ

To configure MQ on WebSphere Application Server, you'll need the following information handy:

  • MQ queue manager IP address
  • MQ transmission channel port, which is most often 1414. You can find this information using MQ Explorer, as shown in Figure 5.
Figure 5. MQ listener port in MQ Explorer
MQ listener port in MQ Explorer

(See a larger version of Figure 5.)

Once you have the required information, create the queue in WebSphere MQ as follows:

  1. Use MQ Explorer to configure a local queue to receive the message from Business Process Manager. To do this, right-click the queue manager Queue folder, as shown in Figure 6.
    Figure 6. Configure the MQ queue
    Configure the MQ queue

    (See a larger version of Figure 6.)

  2. Create a server connection channel in the queue manager to connect MQ to WebSphere Application Server, as shown in Figure 7.
    Figure 7. Create a server connection channel
    Create a server connection channel

    (See a larger version of Figure 7.)

Now that you've completed the configuration on MQ, you can proceed to configure WebSphere Application Server to connect with MQ.


Step 2: Configure the WebSphere Application Server MQ provider

In this article, we'll configure WebSphere Application Server using the MQ provider. Using the MQ messaging provider in WebSphere Application Server, Java Message Service (JMS) messaging applications can use your MQ system as an external provider of JMS messaging resources. The MQ messaging provider supports JMS 1.1 domain-independent interfaces (sometimes referred to as "unified" or "common" interfaces). This enables applications to use the same interfaces for both point-to-point and publish/subscribe messaging, and also enables both point-to-point and publish/subscribe messaging within the same transaction. With JMS 1.1, this approach is considered good practice for new applications. The domain-specific interfaces are supported for backwards compatibility for applications developed to use domain-specific queue interfaces, as described in section 1.5 of the JMS 1.1 specification.

To configure the provider, do the following:

  1. Configure the Queue Connection Factory by clicking Resources => JMS =>JMS providers, and selecting the MQ messaging provider for the Queue Connection Factory you want to configure, as shown in Figure 8.
    Figure 8. Select the MQ messaging provider
    Select MQ messaging provider
  2. Change the Scope setting to the level at which the connection factory is visible to applications.
  3. In the contents pane, under Additional Properties, click Queue connection factories to display a table of existing queue connection factories, with a summary of their properties.
  4. Create a new connection factory, as shown in the Figure 9, by specifying the name, JNDI name, queue manager, host, port and channel name.
    Figure 9. Configure queue connection factory
    Configure queue connection factory
  5. To configure the queue, click Resources => JMS =>JMS providers in the navigation pane, and select the MQ messaging provider for the queue destination that you want to configure.
  6. Change the Scope setting to the level at which the JMS destination is visible to applications.
  7. In the contents pane, under Additional Properties, click Queues to display a table of existing queue destinations with a summary of their properties. Create a new queue, as shown in Figure 10, by specifying the name, JNDI name, queue and queue manager name.
    Figure 10. Configure the queue
    Configure the queue

You've now completed the basic MQ configuration of Business Process Manager and are ready to create and configure the application.


Step 3: Configure the MDB

There are two options provided by MQ to configure MDBs: activation specifications and listener ports. We'll use the activation specification method. To configure the activation specification, select Resources => JMS => Activation specifications, as shown in Figure 11. You must do this before installing the MDB EAR.

Figure 11. Configure the activation specification
Configure the activation specification

Once the activation specification is configured, install the EAR and associate the destination JNDI and activation specifcation JNDI with the MDB, as shown in Figure 12.

Figure 12. Configure the activation specification in EAR
Configure the activation specification in EAR

Step 4: Invoke the application

Now that the configuration is complete, you're ready to test the application. The CSV data is sent to MQ queue through the MQ RFHUtil utility, as shown in Figure 14. In a real-world environment, however, this data could be coming from other software systems.

Figure 13. Sending CSV data through RFHUtil
Sending CSV data through RFHUtil

Step 5: Verify the results in Process Portal

Once the message is written to the ExampleQueue, you can log in to the Process Portal as admin. In the inbox, you should see the new process instance that was created as a result of the message, as shown in Figure 15. If you click the green arrow icon to run the process instance, you should see the the data received from the client, as shown below.

Figure 14. The invoked process
The invoked process

Conclusion

This article described how to integrate WebSphere MQ with IBM Business Process Manager V7.5 using the Undercover Agent.


Download

DescriptionNameSize
Project interchange fileMQUCATest.zip7KB

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Business process management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business process management, WebSphere
ArticleID=825909
ArticleTitle=Invoking a process deployed in IBM Business Process Manager V7.5 using WebSphere MQ
publish-date=07182012