IIB9000 BPM Integration Pattern
IIB9000 BPM Integration Pattern
IIB9000 BPM Integration Pattern
June, 2013
June 2013
1.
INTRODUCTION .................................................................................................... 3
1.1
1.2
Solution .............................................................................................................................................................3
2.
3.
4.
5.
6.
Page 2
Version 9.0.0.0
June 2013
1. Introduction
IBM Business Process Manager (BPM) provides enterprise level business process design and
modeling, and IBM Integration Bus provides enterprise strength connectivity and integration.
This pattern is used when an IBM BPM user has defined an interface in a BPM integration service
and that interface must be implemented by using an IBM Integration Bus service.
1.2 Solution
You can use this pattern to generate a new IBM Integration Bus service that can be called by IBM
Business Process Manager.
The BPM and IBM Integration Bus developers work together to integrate IBM BPM integration service
with an IBM Integration Bus service, by completing the following steps:
Page 3
Version 9.0.0.0
June 2013
Page 4
Version 9.0.0.0
June 2013
2. Lab Objectives
In this lab you will investigate the new BPM Integration Pattern in IBM Integration Bus V9.0. You will
explore the pattern parameters and the new capabilities to integrate IBM BPM business process with IBM
Integration Service Bus Web Service. You will be able to see all the Integration Bus applications,
generated as a result of creating a new instance of the pattern.
In addition, this lab exercise will demonstrate the ease of integrating a .NET application in an Integration
Bus V9.0 message flow. The .NET support was first introduced in Message Broker V8.0 and this lab
demonstrates a sample of a complete solution BPM -> Integration Bus Web Service -> .NET
application.
This sample scenario demonstrates Get Account Balance User case. The account number is provided
through a Browser GUI:
The account information is requested from IBM BPM to IBM Integration Bus, which invokes a .NET
application, and returned to IBM BPM. The communication uses Web service.
This lab will use two separate VMware images:
Page 5
IBM Integration Bus V9.0 Image - used also for the rest of the lab exercises on IBM Integration
Bus V9.0 workshop;
IBM BPM Image used for this lab exercise with installed IBM BPM V8.0
BPM Integration Pattern
Provided by IBM BetaWorks
Version 9.0.0.0
June 2013
The supplied images have all the necessary installations already completed.
Please make sure that both images have been started.
Note: This lab is using a shared folder BPM_Workshop which resides on the main host. Please create
the folder on your machine and allow both images to access it. This is necessary for transferring the .twx
files between the images.
Page 6
Version 9.0.0.0
June 2013
Focus the IBM BPM Image by selecting the IBM BPM 8.0 tab in VMware Workstation:
Then click the small box as shown above in order to expand the image to full screen
2.
Start the BPM server (if not already started), by double click on the SERVERS icon and
then Start PC Server:
Please note that it may take a few minutes for the BPM server to start.
Page 7
Version 9.0.0.0
June 2013
3.
Start the IBM Process Designer (if not already started), by double click on TOOLS and
then double click on the icon as shown below:
4.
Click Login.
Page 8
Version 9.0.0.0
June 2013
5.
The previous step opens the Process Center console where we can see all Process
Applications (Process Apps) on our BPM Server.
For this lab, we will be working with IBM Bank Services (IBS) process application (marked
with an yellow star). Click on Open in designer as shown below:
6.
You will see the IBM Process Designer and the Overview page for our Process application.
Click on Processes and you will see the Business process definition.
Page 9
Version 9.0.0.0
7.
June 2013
You will now see the simple Business Process that we will be using in our scenario:
Page 10
You will see the private variables defined for this process:
Version 9.0.0.0
9.
June 2013
When finished reviewing, click on Diagram tab and then double click on Account and
Requests Information:
Page 11
Version 9.0.0.0
June 2013
11. Note that the output from this sub process is the account number that we enter in the User
interface screen:
When finished reviewing, close the sub process by click on x as shown above.
If you wish, you can view the output sub process Account Balance and Transfers by
repeating step 9 12.
Page 12
Version 9.0.0.0
June 2013
13. When finished reviewing we can now add the integration sub process to the main Business
Process.
In the main process screen, hover over Implementation and click on the little + sign and
then click on Integration service:
Click Finish.
Page 13
Version 9.0.0.0
June 2013
16. Here we will have to add the necessary input and outputs for the Web Service:
Page 14
Version 9.0.0.0
June 2013
18. As above, add the two outputs that the Web service will return (use Add Output):
accountBalance
lastUpdated
When done, your Variables view should look as below:
Page 15
Version 9.0.0.0
June 2013
20. Name the toolkit IIB Web Service Toolkit and enter a unique acronym as shown:
Click OK.
21. We will now go to the Process Center. Click on the Process Center icon:
22. In the process center click on the Toolkits icon to view the available toolkits. You will see
that the toolkit that we have just created is listed on top:
Make a single click on the name of the toolkit (Do not click on Open in Designer):
Page 16
Version 9.0.0.0
June 2013
23. You will see that there are no Snapshots created for the toolkit and we need to create one in
order to be able to export it to IBM Integration Bus. Click on Create New Snapshot:
24. In the opened window we will name the snapshot IIB Web Service Toolkit V1.0 and will give
a brief description:
Click Create.
Page 17
Version 9.0.0.0
June 2013
25. Once the new snapshot has been created, we can export it as a .twx file, which we will use
to create the Web Service in IBM Integration Bus V9.0.
Click Export.
27. In the File Download window, select Save
Page 18
Version 9.0.0.0
June 2013
28. The VMware images have been set up to use shared folder on the host machine. This is
where we will export out .twx file. Navigate to Shared Folders -> BPM_Workshop.
We will keep the file name as suggested and will save it.
We are ready now to create the Web service in IBM Integration Bus V9.0, using the exported
.twx file.
Page 19
Version 9.0.0.0
June 2013
1.
Bring the IBM Integration Bus image to focus from VMware Workstation as shown below:
At the workspace prompt, specify your own name for the workspace in the directory
c:\workspaces.
When the workspace has opened, close the Welcome pane to reveal the Integration Bus
Toolkit.
Page 20
Version 9.0.0.0
June 2013
3.
4.
In the Pattern explorer view, select on BPM Mediation pattern and review the description
about the pattern:
When finished reading about the pattern, click on Create new Instance.
Page 21
Version 9.0.0.0
5.
June 2013
Click OK.
6.
Page 22
Version 9.0.0.0
June 2013
7.
8.
Locate the shared folder from the Host, BMP_Workshop. You will see that the .twx file you
saved earlier:
Page 23
Version 9.0.0.0
9.
June 2013
IBM Integration Bus V9.0 Toolkit discovers the artefacts from the imported .twx file. Select
IIB Integration:
Click Finish.
10. In the Configure Pattern Parameters window select Integration Bus Service:
Page 24
Version 9.0.0.0
June 2013
11. We will create a new service, so in the next window name the new service as Get_Balance:
Click Finish.
12. You are ready now to generate the pattern Instance:
Click Generate.
Page 25
Version 9.0.0.0
June 2013
13. Once the generation process has completed, you will see the generated resources in the
Application Development view. Expand Get_Balance service as shown:
IBM Integration Bus has generated the schemas, WSDL definition, the subflows and the
Service description.
Please double click on any of these to view and explore.
When finished reviewing, double-click on IIBIntegration.
14. This will open the Web Service Message Flow:
Click on Get_Balance
Page 26
Version 9.0.0.0
June 2013
You will see that the Operations and their parameters for the service have been generated.
The parameters are those that were defined.
16. Go back to the Message Flow view, by a click on Service and then click on IIBIntegration:
Page 27
Version 9.0.0.0
June 2013
18. IBM Integration Bus reads the .NET assembly class methods and ask you to selct the ones
you would like to invoke in the application. Tick GetBalance:
Click OK.
Page 28
Version 9.0.0.0
June 2013
19. An ESQL Compute node will be placed now in your service flow. Connect the nodes as
shown below. For the Compute node use output Out.
Page 29
Version 9.0.0.0
June 2013
21. You will have to insert a few ESQL code lines in order to declare the used variables and call
the GetBalance procedure. Navigate to c:\Student\BPM\ESQL folder and open the file
GetBalance_ESQL.txt
These are the additional lines of code that you need to add to the generated code in the
ESQL Compute node. Alternatively the complete code is in the file
Get_Balance_ESQL_full.txt.
22. Once finished your ESQL compute node should have the code as shown below:
Page 30
Version 9.0.0.0
June 2013
24. In the Integration Nodes field (bottom left) start IB9NODE, if not already started. Right click
on the node and select Start:
Page 31
Version 9.0.0.0
June 2013
25. We are now ready to deploy the service we created to the Integration Node. Drag the service
and drop it on over the default Integration Server as shown below:
26. Once the service has been deployed, we can view that in the Default Integration Server:
27. Click on the service in the Integration Server to view its properties:
You can see the service URLs and the location of the BAR file that has been generated.
Please, make a note of the IP address in the Service Query URL line.
Page 32
Version 9.0.0.0
June 2013
28. You will now export the newly created service into a BPM .twx file:
In Application Development window, right-click on Integration service Description. Click on
Export.
Page 33
Version 9.0.0.0
June 2013
29. In the opened dialog, expand Integration Bus IBM Business Process Manager Integration
and select Business Process Manager Export (.TWX). Click Next.
Page 34
Version 9.0.0.0
June 2013
Click Next.
31. On the following screen, you need to provide Snapshot name Lets keep it as the original
files name, changing only the version number IIB Web Service Toolkit V2.0
Please note that export location is again the shared folder that resides on the host machine.
Click Finish.
Page 35
Version 9.0.0.0
June 2013
Page 36
Version 9.0.0.0
June 2013
In the BPM VMware image, you should have the Process Center open. Click on the Toolkits
tab:
3.
Navigate to the shared folder BPM_Workshop and make sure you select V2.0 of the files,
which was updated in IBM Integration Bus
Version 9.0.0.0
June 2013
4.
5.
IBM BPM recognizes this as a newer version (snapshot) of the IIB Web Service Toolkit and
you can view it by a click on the its name:
This will open the view for available snapshots of the toolkit:
Page 38
Version 9.0.0.0
June 2013
6.
Open our Business Process by clicking on Process Apps, then Open in Designer for IBM
Bank Services (IBS):
7.
Once in IBM Process designer, hover over Toolkits and click on the + sign. Scroll down in
the Add dependency window to view the IIB_Web_Service_Toolkit_V2.0 toolkit:
Page 39
Version 9.0.0.0
June 2013
8.
Single click on the added toolkit, then click on Implementation. You will see our integration
service IIB Integration. Drag and drop it directly onto our Business Process, as into the
System lane as shown below:
9.
Page 40
Version 9.0.0.0
June 2013
10. Once opened, you will see the implementation Call Integration Service on Integration Bus
Page 41
Version 9.0.0.0
June 2013
Click on the little buttons with arrows to complete the mapping automatically.
Page 42
Version 9.0.0.0
June 2013
15. Your properties view should look like the screen shot below:
Page 43
Version 9.0.0.0
2.
June 2013
This will open the Inspector view. Select the Received row. The diagram view points to
which part of the process you are currently Account and requests Information:
Click OK.
Page 44
Version 9.0.0.0
4.
June 2013
Here you are required to input an account number put any random number.
Press Get balance
Page 45
Version 9.0.0.0
5.
June 2013
You are returned to the Inspector view. Click the Refresh button in the top right corner:
The process now is at the IIB Integration system sub process, which will make the call via
our Web Service to IBM Integration Bus and invoke the .NET application. It may take a
couple of seconds, so refresh again, until you see the red pointer over the last sub process
Account balance and Transfers.
Please note that depending on how quickly you press the refresh button, will depend if you
will see the pointer over the System sub process. More likely is that you will see the pointer
over the last sub process, because the System sub process is automatic and it does not
expect any input from you.
Note: It is possible that the firewall on the VMware image with Integration Bus will
block the first Web Service call from BPM. Please check the image if there is a pop up
window and click OK to allow it. You may need to re-start the BPM test from step 1.
Page 46
Version 9.0.0.0
6.
June 2013
Once the process is completed, you will see the pointer over the Account Balance and
Transfers:
Click on Received. As shown above and the Play button to view the returned result from
IBM Integration Bus.
7.
Click OK.
Page 47
Version 9.0.0.0
8.
June 2013
In the browser you will view the returned information (the .NET application generates a
random Balance amount so you will see different number than that on the screen capture
below:
Page 48
Version 9.0.0.0