158 Implementing an Advanced Application Using Processes, Rules, Events, and Reports
5.8 Create an advanced integration service
Finally, we will create an advanced integration service, which is used to call a service
implemented in Integration Designer from a BPD (via a system task) or another service (via a
nested service). This service will confirm product types by serial numbers.
Using IBM Process Designer:
1. Create a new Advanced Integration Service called Product Lookup, then add an input field
as SerialNumber (string) and an output field as ProductType (string) as shown in
Figure 5-60.
2. Save the service.
Figure 5-60 Create a new Advanced Integration Service
3. Open Integration Designer and go to Process Center, and then open the Warranty
Processes process application (See Figure 5-61).
Figure 5-61 Open the Warranty Processes process application
4. Open the advanced integration, which shows that it is unimplemented; right-click it and
choose Implement (See Figure 5-62 on page 159).
Chapter 5. Business process management with Business Process Manager 159
Figure 5-62 Implement the new Advanced Integration Service
5. Select a Microflow as the implementation type (See Figure 5-63) and add a snippet.
Figure 5-63 Choose Microflow as implementation type
6. In the properties for the snippet change to the Java source view and enter the code shown
in Example 5-3.
Example 5-3 Snippet code
if (SerialNumber.startsWith("A")) {
160 Implementing an Advanced Application Using Processes, Rules, Events, and Reports
ProductType = "Apple";
} else {
ProductType = "Banana";
}
7. Save the completed snippet as shown in Figure 5-64.
Figure 5-64 Add code to Java source view
8. Right-click and publish the process application.
9. Create a TestIntegration process (Figure 5-65), and add SerialNumber as input and
ProductType as output (that is, the same as the Advanced Integration).
Figure 5-65 Create a TestIntegration process
10.Set the SerialNumber to any value as defaults (Figure 5-66).
Figure 5-66 Set default for SerialNumber
Chapter 5. Business process management with Business Process Manager 161
11.Drag the Advanced Integration into the system swim lane (Figure 5-67).
Figure 5-67 Drag the advanced integration service into the system lane
12.Hook the activity up to Start and End, and map the input and outputs to match
(Figure 5-68).
Figure 5-68 Map the inputs and outputs
13.Execute and examine the output to verify it (Figure 5-69 on page 162).
162 Implementing an Advanced Application Using Processes, Rules, Events, and Reports
Figure 5-69 Execute the TestIntegration process and verify the output
For our warranty sample, we documented only one integration type in this chapter. Using IBM
Business Process Manager, you can configure and manage outbound and inbound
communication with external systems using BPM components and services to perform many
tasks.
Outbound integrations enable business processes authored in Process Designer to interact
with other systems, such as a web service, a content management system, or an external
database. Depending on the system that you are integrating with, you can implement the
integration service using an Integration Service implementation or an IBM Case Manager
Integration Service implementation.
For inbound integrations that involve an external system or application calling into IBM
Business Process Manager to kick off a service, you need to build several BPM components
and corresponding services.
Note: To learn more about creating outbound integrations, we refer you to:
http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r0mx/topic/com.ibm.wbpm.wle.edi
tor.doc/modeling/topic/creating_outbound_integrations.html
Note: To learn more about creating inbound integrations, we refer you to:
http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r0mx/topic/com.ibm.wbpm.wle.edi
tor.doc/modeling/topic/creating_inbound_integrations.html

Get Implementing an Advanced Application Using Processes, Rules, Events, and Reports now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.