IBM - IIB,WTX,EDI and BPM Solutions By Mallibabu

Thursday 28 April 2016

Exposing a BPD as a WebService in IBM BPM Process Designer


There are two common scenarios in IBM BPM Process designer while integrating with Web Services. It can be either inbound or outbound integration.

Outbound Integration involves the Business Process Definitions (BPD) invoking external Web Services as part of the process. It is a straight forward configuration – Giving WSDL url in web service integration activity embedded in Integration Service component.

This document focuses on inbound integration and involves exposing the BPD as a web service for external users. For Process Manager to kick off a service, you need to build several IBM BPM components and corresponding services.

Below is the diagrammatic representation of interaction between different components in inbound integration.



Below is the sample BPD that need to be exposed as a Web Service








An Inbound integration configured to kickoff BPD has the following components.

1.Web Service – It is created for an external system or application to call into Business Process Manager
2. Integration ServiceA service with appropriate inputs is created to call the undercover agent (UCA) to send the event .

3. Message Event

4. UCA – (Under Cover Agent) The UCA tells IBM® Business Process Manager what service to run when the message event is received

5. General Service – The UCA that you attach to the message event needs a service to pass the parameter values from the runtime message to the BPD

6. Web Service

            Create a new Web service implementation as shown below.






In the Operations section, press Add for each operation that is desired to be exposed on the WebService. For each operation added, an IBPM Service needs to be associated with it. This implies that the service must be created before adding the operation. When deployed, a call to a named operation will result in the invocation of the corresponding IBPM Service. Any parameters defined as input on the IBPM Service will be exposed as parameters on the Web Service call. Any parameters defined as output on the IBPM Service will be returned as parameters on the Web Service call.


WSDL URI in the behaviour section is the Web URL that can be used to retrieve the WSDL file that describes the exposed Web Service.

Integration Service
A Web Service definition created above need to be associated with a Integration Service. It is this Integration Service that will be called when the Web Service is invoked. This Service should cause the invocation of the UCA. A suitable Service may be designed as below:


UCA
The UCA tells IBM® Business Process Manager what service to run when the message event is received. The message can be triggered by IBM BPM itself or by an external system as in this example.



Associated with a Message Start Event node is a UCA. A UCA acts as the “trigger” to the Start Message Event. Before we can define a UCA, we need a General Service that is to be associated with the UCA. The result (output) of the General Service is the “value” passed by the UCA to its associated partner which in this case will be the Start Message Event Node in the BPD.


A suitable General Service may just pass the input to the output




MessageEvent
When an event occurs, that event must be matched against the correct instance of the process for which the event is destined. The ability to match the event against the correct instance is called correlation. You must specify one variable in the message event that has a value that matches the value of the incoming event’s UCA payload (the correlation value). If there is such a match, the message is received. If not, the message is not received, and the event continues to wait.



 WSDL





LOG FILE INFO