ibm bpm advanced – exploring advanced integration services · 2015-07-30 · lab 11 – advanced...

43
IBM Software An IBM Proof of Technology IBM BPM Advanced – Exploring Advanced Integration Services Lab Exercises

Upload: others

Post on 16-Mar-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

IBM Software

An IBM Proof of Technology

IBM BPM Advanced – Exploring Advanced Integration Services Lab Exercises

Page 2: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has
Page 3: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

IBM Software

Exploring Advanced Integration Services Page 3

Contents LAB 11 ! CREATING AN ADVANCED INTEGRATION SERVICE ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 !

11.1! PART 1 – WORKING WITH THE PROCESS DESIGNER ........................................................................................ 6!11.1.1! IMPORTING THE INITIAL PROCESS APPLICATION .............................................................................. 6!11.1.2! CREATE AN AIS IN THE BUSINESS PROCESS .................................................................................. 8!

11.2! PART 2 - IMPLEMENT THE AIS IN INTEGRATION DESIGNER ............................................................................. 12!11.2.1! USING INTEGRATION DESIGNER TO IMPLEMENT THE AIS ............................................................... 13!

11.3! PART 3 – RUN THE BPD IN THE PROCESS DESIGNER AND EXECUTE THE AIS .................................................. 20!11.3.1! TEST THE END-TO-END BUSINESS PROCESS (INCLUDING THE AIS) IN PROCESS DESIGNER ............... 20!

11.4! PART 4 – RE-IMPLEMENT THE AIS IN INTEGRATION DESIGNER AS A BPEL PROCESS ....................................... 24!11.4.1! USE INTEGRATION DESIGNER TO RE-IMPLEMENT THE AIS ............................................................. 24!11.4.2! TEST THE MORTGAGE APPROVAL PROCESS BPD IN PROCESS DESIGNER ..................................... 42!

11.5! SUMMARY ................................................................................................................................................. 43!

Page 4: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 4

Overview Most business processes require a combination of human tasks and integrations with back-end systems. Certain integrations might be complex in nature and require the orchestration of multiple service invocations, and a higher level of transactional integrity and compensation. Such integrations are best developed using the IBM Integration Designer (IID) tool with constructs such as those offered by the Business Process Execution Language (BPEL). Process Designer has Advanced Integration Services (AIS) that allow you to invoke those IID implementations. This lab shows you how Process Designer and Integration Designer can work in concert to create a fully integrated end-to-end BPM solution.

Introduction

There are two fundamental ways in which a business process can take advantage of integration services:

• The business process designer, using Process Designer, can create an AIS that has the high-level details of the interface (inputs, outputs, and exceptions), and let the more technical integration developer complete the implementation in IID. This is a top-down approach.

• Conversely, integration developers could create a number of integration services ahead of time, and let the process developer discover them and re-use them later on, for example, by packaging them in a Toolkit. This is called the bottom-up approach.

This document captures the steps to create a simple Advanced Integration Service in IBM BPM using the top-down approach.

Page 5: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 5

Lab 11 Creating an Advanced Integration Service This lab has four parts:

In Part 1, you create a an AIS using Process Designer

In Part 2, you implement the AIS using Integration Designer

In Part 3, you run the BPD in Process Designer that invokes the integration service

In Part 4, you change the AIS implementation to use a BPEL process

Page 6: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 6

11.1 Part 1 – Working with the Process Designer

We assume that you have the Process Center up and running. If not, open the Servers folder located on your desktop, and double-click Start PC Server.

Also, make sure your Process Designer tool is up and running. If it isn’t, open the Tools folder on your desktop and double-click IBM Process Designer 8.5. Once the tool starts, log in as admin (password admin).

In Process Designer, a welcome screen may appear – close it before proceeding with the lab.

11.1.1 Importing the initial process application

As we have done for previous labs, we import a Process App that we then augment with new functions – in this case, an Advanced Integration Service.

To allow the Integration Designer access to the Toolkit used by the process app we are going to be working with in this lab, we need to make sure it is updateable.

__1. In Process Designer, make sure you are in the Process Center view. Click Toolkits and then click the Better Mortgage Toolkit (BMT):

__2. Click Manage and then check Allow users to update toolkit.

__3. Once it is checked, it should look as follows:

Page 7: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 7

__4. Repeat same steps above to make the Color TK (CTK) updateable

__5. Click Process Apps. Then from the menu on the right, click Import Process App.

__a. Browse… to select the file C:\BPM-V8.5-5-PoT\LabWorkbook\AIS\Mortgage_Application_Process_AIS - V3.1_-_Initial.twx.

__b. Click OK

Page 8: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 8

__c. Click Import to complete the import.

The process app gets added to the list.

We can now open the imported Mortgage Application Process application in the designer:

__6. Next to imported app - Mortgage Application Process Advanced Integrations (MAPAIS), click Open in Designer.

11.1.2 Create an AIS in the business process

__1. In the Designer perspective, from the process library, click Processes and then double-click on the Mortgage Approval Process under Business Process Definitions.

Page 9: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 9

The process diagram opens in the main editor pane. Scroll down to the System lane: in the next step, we will be adding an Advanced Integration Service to replace the Update Systems of Record Activity with an Advanced Integration Service.

Let’s create a new Advanced Integration Service.

__2. From the process library, next to Implementation click . Under Create New, select Advanced Integration Service.

__3. In the New Advanced Integration Service dialog, name the service Update Systems of Records AIS, and then click Finish.

The Advanced Integration Service editor opens up. Let’s define the input and output of this new service.

Page 10: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 10

__4. In the Parameters section, click Add Input. In the Parameter Details section, type application for the Name, then set the Parameter Type to Application:

__5. Repeat the previous step to add an output parameter named application of type Application. The Parameters section should look like the following screen shot:

__6. Save (Ctrl-S) your work and close the Advanced Integration Service editor:

We can now replace the Activity Update Systems of Record in the process with the recently created Update Systems of Record AIS Advanced Integration Service.

__7. Go back to the process diagram (if you closed it, click Processes and then double-click on the Mortgage Approval Process again).

Page 11: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 11

__8. From the process library, click Implementation, and under Advanced Integration Service drag-and-drop Update Systems of Record AIS onto the System swim lane next to the existing Update Systems of Record box:

__9. Now, click on the tip of the sequence flow arrow that goes into Update Systems of Record, and drag it to the input to Update Systems of Record AIS:

Page 12: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 12

__10. Then, drag the starting end of the arrow that flows out of Update Systems of Record to the corresponding spot in Update Systems of Record AIS. This portion of the diagram should end up looking as follows:

__11. Right-click on Update Systems of Record then select Edit ! Delete

__12. Now, click on Update Systems of Record AIS to select it. In the Properties pane at the bottom, switch to the Data Mapping tab. Click the auto mapping icons for both input and output mapping. The two fields should be automatically populated with tw.local.application:

__13. Click on Implementation and verify that Delete task on completion? Is unchecked

__14. Save your work (Ctrl-S).

__15. Double-click on Update Systems of Record AIS to open this Advanced Integration Service. Keep the Process Designer open.

Great! Your work as a process author is done for now. You have created the definition of an Advanced Integration Service, which a more technical user will implement using the Integration Designer.

11.2 Part 2 - Implement the AIS in Integration Designer

In this section, you will take the unimplemented Advanced Integration Service and complete its implementation in the Integration Designer.

Page 13: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 13

11.2.1 Using Integration Designer to implement the AIS

Launch the Integration Designer:

__16. Minimize the Process Designer.

__17. From the Desktop, click TOOLS and then click IBM Integration Designer 8.5.

__18. Specify C:\workspaces\AIS for the workspace name – this will create a new workspace. Leave the checkbox Use this as the default and do not ask again unchecked and click OK:

__19. You may be prompted for a storage password, enter admin and click OK

__20. When Integration Designer starts you may see an introduction page is shown with active links to help, samples and tutorials. Close the Getting Started – IBM Integration Designer. If so, you can close it.

__21. Next to Mortgage Application Process Advanced Integrations (MAPAIS), click Open in workspace

Page 14: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 14

Note: this is one of the various ways to open the AIS into Integration Designer. However, rarely the same person will work with both Process Designer and Integration Designer. Integration Designer also allows you to connect to Process Center and open the Process App that contains the AIS.

__22. Switch to the Integration Designer using Alt-Tab or an alternative means. Click OK on the dialog window that pops up. Everything should be selected.

__23. Wait until the workspace has been initialized and built. A progress bar is located on the lower right corner of the Integration Designer. The resulting Business Integration Project should look as follows:

Page 15: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 15

__24. If Mortgage Approval Process has [changed] next to it, right Click on [changed] Mortgage Approval Process Main, and select Refresh and Publish:

The tool may ask if whether you want to create a new snapshot of the dependent toolkit:

If so, set Better Mortgage Toolkit’s (top line) snapshot name to v3.1 AIS (or, some unique name), Color TK (second line) to default name but replace ending 1 with AIS (or, some unique name), then click Refresh and Publish on the presented dialog (depending on some of the labs you did earlier, the snapshot name might be different):

Wait until the synchronization with the Process Center is complete.

Let’s now implement Update Systems of Record AIS service. We start with a POJO (Plain Old Java Object) implementation.

__25. In the project tree of the Business Integration perspective, expand Advanced Integration Services under Mortgage Application Process. Notice that Update Systems of Record AIS is labeled as unimplemented. Right-click on it and click Implement:

Page 16: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 16

__26. In the Implement Advanced Integration Service window, select Java component, and click on Finish. This will open up a java editor with predefined functions and methods.

Complete the invoke method:

__27. In the Java editor, scroll down to the bottom, by the invoke method:

Let’s write some logic that sets the mortgage application status to “RECORDED” and print out some information to the log files, for initial debugging purposes, as shown below:

Page 17: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 17

__28. Just replace return null; with the following snippet of code:

application.setString("status","RECORDED"); System.out.println("********<<Advanced Integration Service Java Implementation successfully executed>>********"); return application;

__29. Save your work (Ctrl-S).

Unit Test the Update Systems of Record AIS Advanced Integration Service in the Integration Designer

__30. In Business Integration, expand Mortgage Approval Process AIS ! Advanced Integration Services, then right-click Update Systems of Record AIS and then select Test Implementation.

Page 18: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 18

__31. This launches the Integration Test Client, with the Configuration, Module, Component, Interface, and Operation all pre-selected. In the lower right hand section of the Integration Test Client, populate the data under Detail Properties. It is important in particular to populate and note the “status” property, set to APPROVED in this example.

Page 19: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 19

__a. Under Events, press the Play button to start the Test.

__b. Click Finish and OK respectively on the next two dialogs.

Page 20: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 20

__c. This will deploy the project to the test server and run the implementation. You will see a trace of all the components that are being executed, and a result. Note that the status which was set to “APPROVED” is now updated to “RECORDED”:

Fine! We have unit tested the AIS successfully. Now, let’s use it in our BPMN process.

11.3 Part 3 – Run the BPD in the Process Designer and execute the AIS

At the end of Part 2, you tested and determined that the Advanced Integration Service is working as expected. In this next section, you will take the completed Business Process and execute it in the BPD, using the Process Inspector to walk through the business process and execute the Advanced Integration Service.

11.3.1 Test the end-to-end business process (including the AIS) in Process Designer

__32. Minimize Integration Designer, and switch back to Process Designer.

__33. Make sure that the Mortgage Approval Process diagram is open. If you left Process Designer in the state it was when you last switched to Integration Designer, just select Mortgage Approval Process from the pull down at the top of the editor pane:

Page 21: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 21

Test the Mortgage Approval Process and Update Systems of Record AIS Advanced Integration Service from the Process Designer

__34. Click the play or “Run Process” button in the upper right hand corner to run the Mortgage Approval Process:

__35. If you are prompted, click Yes to switch to the Inspector view to see the progress of the process instance:

__36. The Inspector opens up, already focused on the running process instance. Select the task on the top right pane (Enter Application Data), and press the play button:

__37. Pick the admin user, and hit OK.

__38. The browser will open with the first coach of the mortgage approval process. This should be familiar from previous labs. Populate information in some of the tabs, as you previously did in earlier labs, and click Submit to complete the task.

__39. Close the browser window.

__40. Back to Process Designer, click the refresh icon:

Page 22: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 22

__41. You should see a second step on the stack (Assess Risk). Select it and click play:

__42. Again, pick admin as the user for the role and click OK.

__43. Once the coach opens, just click Submit. Close the browser window.

__44. Refresh the process state again as you did before. There’s a third task, Review for Approval. Select it and click play:

__45. Again, pick admin for the user and click OK.

__46. On the coach, this time, make sure you switch to the Final Decision tab and type ACCEPT:

__47. Then, click Submit. Close the browser.

Page 23: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 23

__48. In the Inspector, hit the refresh icon a few times until the process completes. The stack should look like the following screen shot:

__49. Now, Under Execution State, select Mortgage Approval Process and under the Variables tab, double-click application. The inspector shows you the XML representation of the final application business object:

Page 24: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 24

Scroll down in the XML pane if required. You should notice that the though the status was set to “ACCEPTED” in the Review for Approval, the Advanced Integration Service changed it to “RECORDED”:

We have tested an end-to-end process that includes an AIS!

11.4 Part 4 – Re-implement the AIS in Integration Designer as a BPEL process

In the previous sections, we created a rather dummy implementation of our AIS, just to prove the concept of being able to invoke integration artifacts from BPMN processes. Most likely, your integration artifacts will be complex service orchestrations, with mappings, adapters, and so on.

In this next section, you will take the implemented Advanced Integration Service and re-implement it as a BPEL business process.

11.4.1 Use Integration Designer to re-implement the AIS

__50. Minimize Process Designer

__51. Maximize Integration Designer

Page 25: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 25

Let’s open the Assembly Diagram of the implementation.

__52. In Business Integration, expand Mortgage_Application_Process_Implementation and double-click Assembly Diagram:

.

The Assembly Diagram shows two components:

__i. An Export (that the outside world uses to call the integration) – UpdateSystemsofRecordAIS

__ii. And the Java Implementation that we created in Part 2, UpdateSystemsofRecordAIS_JavaImplementation.

We want to replace the Java implementation with a BPEL process. Create a BPEL Process skeleton and implement it:

Page 26: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 26

__53. Drag-and-Drop Process onto the canvas. Rename Component to UpdateSystemsofRecordAIS_BPEL

__54. Disconnect the Export from the Java Implementation and connect it to the UpdateSystemsofRecordAIS_BPEL process:

__a. Click OK when presented with the option to creating a matching interface on the target BPEL process. This will associate the same interface (business object application and operation invoke) that was used by the Java implementation

Page 27: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 27

__55. You should see an exclamation point next to the BPEL process, which means that it has not been implemented yet.

__56. Double-click the BPEL process to open it in the BPEL editor. Click Yes at the Open dialog.

__57. Click New Folder on the subsequent dialog and specify com/ibm/test for the target folder. Click OK to confirm the new folder, and then OK to complete the operation:

Page 28: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 28

Complete the implementation of the BPEL Process

__58. Wait until the workspace is fully built. The BPEL Process diagram will be displayed once this is completed. The BPEL Process diagram is up to down (while the BPMN in the Process Designer is displayed left to right), and starts off with a Receive and Reply activities.

__59. Click the green circle at the top of the process diagram, and then click Show in ! Properties View:

Page 29: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 29

__60. Click Details. This will open the general properties for this process at the bottom of the screen. Notice that, by default, this process is configured to be a long running process:

Long-running processes are useful when process state needs to be preserved for a longer time than the span of a single transaction. In this case, since the process needs to record the transaction to one or more systems of record, we don’t need to preserve this state. We can make this process a microflow, which has much better performance characteristics than a long-running process.

__61. Click Refactor to microflow…:

__a. If you are prompted to save the outstanding changes, click OK.

__b. And then click Refactor:

Now the process type should be Microflow:

Page 30: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 30

__62. Back on the main process editor, select the Receive activity.

In the Properties pane below the diagram, switch to Details. Take a look at the operation and input parameter (application) that is what was specified in the Process Designer in Part 1. Also note that name of the BPEL variable which maps to the input business object (application):

__63. Similarly, click the Reply activity and in the Properties tab below the diagram, select Details.

Take a look at the operation and output parameter (application) that was specified in the Process Designer in Part 1 as well. The Output named application will receive the data from the variable application1 which is also a local variable:

The reason why the input and output variable are different is that – in many cases – you may want to preserve the original state of the input while you are working on the output. But in our case, we don’t need to do that – we can change directly the input variable, and return it as output.

Page 31: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 31

__64. Click application1 and then select application from the list:

__65. The Reply settings should look as follows:

__66. You can eliminate the extra BPEL variable application1. On the right hand side of the main editor pane, locate the Variables drawer, select application1, and then click the red “X” to delete it:

Page 32: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 32

__67. Save your work (Ctrl-S) and wait for the build to finish.

Let’s now add a simple activity that sets the mortgage application status.

__68. Drag-and-drop an Assign activity between Receive and Reply:

__69. Name the activity Set Autorecorded:

Page 33: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 33

__70. Click the activity you just added to select it. In the Properties pane below, switch to Details:

__71. Click Select From: and then select String (enter a value). Type AUTORECORDED in the text area:

__72. Click Enter to complete the step and then click Select To:

Page 34: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 34

__73. Here, you need to expand application and then select status:

__74. This should be the result:

__75. Save your work.

Now, we want to invoke a service that performs the recording. Normally, BPEL processes invoke a number of external services, via web services, JMS, adapters, and other protocols. But in this exercise, we are just going to show how to invoke a single service – and we’ll pick our POJO for the implementation.

__76. On the main canvas, drag-and-drop an Invoke operation just above the Reply activity:

Page 35: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 35

__77. Name it Invoke POJO. Invoke operations need a “Reference Partner” to invoke – the reference partner represents the external service being invoked. On the right hand side, click on the plus sign by Reference Partners. For Name type POJO, then select the UpdateSystemsofRecordAIS interface under Matching Interfaces and click OK:

Page 36: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 36

__78. The partner is created. Now, click the Invoke POJO operation you just added, and in the Properties pane, click Browse… by Partner. Then select POJO and click OK:

Page 37: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 37

__79. Now, for the Inputs in the Properties click none and then select application:

__80. Do the same for Outputs. The end game should look as follows:

__81. We are done with the BPEL process. This process now sets the mortgage status to AUTORECORDED and then calls a service that does the actual recording. Save your work (Ctrl+S), and close the BPEL editor:

Page 38: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 38

Let’s now wire the BPEL process to the POJO service.

__82. Go back to the Assembly Diagram. Notice the error indication by the BPEL process component:

__83. The error is there because we manually added a partner reference, which is not yet reflected on the diagram. Right-click the BPEL process component and click Synchronize Interfaces and References…! from Implementation:

__84. Click Yes on the confirmation dialog. Notice that now the BPEL process has a reference icon:

__85. We want to wire the reference to the target service. Hover with the mouse over the reference icon, so that a connector appears:

Page 39: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 39

__86. Now, click-and-drag it to the input interface of the POJO component:

__87. The connection is made, and the end result should look as follows:

__88. Save your work.

__89. Double-click the POJO component (the last on the diagram on the right) to open up the implementation. The Java editor opens up.

__90. Scroll down to the bottom, where you see these lines of code we added a while back:

__91. Comment out application.setString(“status”, “RECORDED”): and change the text of the following print statement replacing “Java” with “BPEL” as follows:

Now the Java POJO doesn’t do anything other than writing to the log file.

__92. Save your work.

Page 40: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 40

You can now test the new AIS, just like we did before.

__93. In Business Integration, expand Mortgage Approval Process AIS ! Advanced Integration Services, then right-click Update Systems of Record AIS and then select Test Implementation:

__94. Again, the test client comes up. Just like we did before, type APPROVED for the application status field:

Page 41: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 41

__95. Click the play button as you did earlier. Click Finish and OK respectively, on the two dialogs that follow.

__96. Now, the stack trace should show that the BPEL process is being executed too:

__97. And you should see the status change to AUTORECORDED:

We have successfully tested the BPEL process!

Page 42: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 42

11.4.2 Test the Mortgage Approval Process BPD in Process Designer

__98. Refer to Part 3 and test the end-to-end business process including the Advanced Integration Service BPEL process. All the steps should be same, but at the end you should observed the “AUTORECORDED” status in the XML representation of the variable:

Page 43: IBM BPM Advanced – Exploring Advanced Integration Services · 2015-07-30 · Lab 11 – Advanced Integrations Page 5 Lab 11 Creating an Advanced Integration Service This lab has

Lab 11 – Advanced Integrations Page 43

11.5 Summary

You have successfully completed the Advanced Integration Lab. As you can see, the flow from a business process from the Process Designer to Advanced Integration in the Integration Designer is seamless. The capabilities of Advanced Integration provided by IBM Business Process Manager Advanced opens a whole world of Service Orientation with access to process choreography via BPEL, Adapters, easy incorporation of Java, and the needed tools to test every part of the solution.

Though the top-down approach is the most common approach, the other common approach is a bottom-up approach. This process is also very straightforward, where an Integration Designer creates Advanced Integrations and publishes them to the Process Center, and they are made visible to the Process Designer to use in a Business Process Definition.

It is very important to always test and take small incremental functionality steps. This combined with playbacks done often, you will find that this not only shortens the development lifecycle, but also keeps the stakeholders and business users involved and invested in the application development process. This allows for better communication and quick agreement on what the requirements actually are. If you have any more questions on any of these labs, please contact your IBM Technical Professional.