Home

Integrate a WebService in IBM BPM v8.6

Introduction
In this article, we will show you how to integration WebService for business process applications in IBM Business Process Manager. You can configure IBM BPM processes to communicate with an external system to retrieve, update, or insert data. And, external applications can call into IBM BPM to initiate services. You can manage inbound and outbound communication with external systems using undercover agents, web services, and integration services.  
Overview
To use a WebService in Process Designer, you first discover the WSDL and then generate an external service from it. The external service contains operations with inputs and outputs based on the methods in the discovered WDSL. When you discover a service, if a corresponding external service already exists in Process Designer, you can either overwrite the existing service or create a new one.
We need to follow the below steps to Integrate with Java Service.
1.     Get the WSDL from External Service.
2.     Create a External Service.
3.     Create a Service Flow.
4.     Test the application
Get the WSDL from External Service
Before creating the external service, we should get the WSDL from external service. This wsdl will be provided by provider system. I have created a SOAP based webservice using Spring Boot for this article. We can access the wsdl by accessing below url.
You can download the the entaire Spring boot application and get the wsdl from download section.
Create a External Service
Beside Services in the library navigation, click the plus sign (+). Select External Service.
In the New External Service page, choose Java, REST or Web service and click on next.
Select URL (WSDL) as the method to discover a service.
Enter the External Service name as ‘Country Service
Enter the Host or URL as above provided wsdl url as shown below and click on Next.
The next window will show the list of operations available in wsdl, in our case we have only one operation ‘getCountry’ select the operation and click on Next.
 
Now we can get XML Schema types with Business Objects, this will generate dispayed Business Objects in our BPM. Click on Next.
The new window will show for creating server to connect with external service. Please enter server name as ‘SOAP_ServiceServer’ and click on finish. This will create an entry in environemnt variables with ‘SOAP_ServiceServer’ as name.
Create a Service Flow
Beside Services in the library navigation, click the plus sign (+). Select Service Flow.
In the Service Flow editor, select a Service task. In the Implementation tab for the service, select the external Service which we have created in above step.
Select the operation name ‘getCountry’ from drop down.
Select the variables section and create input variable name as ‘countryName’ type String and output variable name as ‘countryDetails type ‘country’.
Select Diagram section and select Call WebService service task à select properties and select Data Mapping and map the variables as shown below.
Test the application
We have implemented integration flow now and ready for testing.
Click on Debug button at right corner. Make sure in variables section you have selected default value for input ‘countryName’.
Finally you can see response as shown below.
Conclusion
This article discussed the necessary building blocks for understanding what it takes to build and implement a WebService integration component. You learned how variables defined in an IBM BPM process application are mapped to variables defined in WSDL. I suggest to use pre-configured servers, because we have all web service descriptions in one place, so we can change them much easier than if they were hidden somewhere in the BPD. We can also access and change them in the Process Admin Console after application deployment in the same way as changing environment variables. I hope this article helpful for some of you, I will come up with more interesting articles soon.
Download
S. No
File Name
Size
Download
1
Integrate a WebService in IBM BPM.pdf
1.6 MB
2
BPM_Integration_App_V3_WebService Integration.zip
10 MB

Comments