Learn how to use the undercover agent (UCA), handlers and web services in IBM Business Process Manager V8.0 to implement a BPD with an external system. The BPM process will expose a web service that will be invoked by another system. The negotiation continues until an approval or rejection occurs.
This article demonstrates how you can implement a BPD in a business activity using IBM Business Process Manager (IBM BPM). The sample scenario is a simple loan processing system.
The scenario we'll use is as follows:
Save the customer details which are Cumming from web Service.
The implementation of the business scenario consists of the following high-level tasks:
- Create Process App
- Define the business process.
- Define the business objects.
- Defining and implementing the activities.
- Test the application.
Open IBM Process Designer with user name and Password. Click on Create a New Process App, give the Process App name as “MY BPD Invoked By WS”, Acronym as “BPDWS” then click on Create. Click on “Open in Designer”. It will open our MY BPD Invoked By WS.
On the left pane, click + symbol in the Processes section, Select Business Process Definition. Give the new BPD name as CuatomerBPD then click on finish. We'll cover how to implement the BPD in Defining and implementing the activities.
Click on + Symbol near Implementation select UCA give name as UCA, Select Schedule type as “On Event” select attached service UCAGSS then click on finish.
Two business objects is defined for this application. You can find them under the Data in the Process Designer. These business objects are Customer
On left pane, click + in the Data Section select Business Objects give name as “Customer” then click on finish. Click on add button of Parameters to add. Create the above parameters and change the Data type of the parameter as per requirement then save the data.
Create the following three private variables in BPD. Open MY BPD Invoked By WS, click on variable section to see the variables, as shown in Figure.
· Click on add Private and give name as Data, select type as Customer.
This section describes the BPD. The below Figure illustrates the complete flow of the activities used in the sample application. The following sections describe each of the activities and their implementation.
Drag and drop a Activity to System Swimline. Change the implementation as Script and add the following code.
In this section, we'll look into the components that connect and route the message to the messaging event. Click the Implementation under MY BPD Invoked By WS.
Click on + Symbol near Implementation select General System give name as UCAGSS then click on finish. Add the Variables as shown below figure.
Click on + Symbol near Implementation select UCA give name as UCA, Select Schedule type as “On Event” select attached service UCAGSS then click on finish.
Click on + Symbol near Implementation select General System give name as CalledByWS then click on finish.
Select Variable section in CalledByWS General System. Add input “requestData” as Customer data type and out put “responseData” as String data type.
Select Diagram Section in CalledByWS General System and add a Server Script activity change the name as Log data. Select the properties and add the following code inside implementation block.
Add Invoke UCA activity and select attached Undercover Agent as UCA.
Click on +Symbol near Implementation select Web Service give name as CustomerWS then click on finish.
Select the attached Service as CalledByWS General System. And add the Operation name as “addCustomerInfo()”
Now we can see WSDL Url here.
Now our Application is ready. Now we need to test the application.
To test the application, complete the following steps:
Click on WSDL URL, It will open in a browser. Add the WSDL File into SOAP UI as a Project. Add the Request data as shown below then Click on Run button as shown here in green.Now you can see the response as shown above figure and confirm from log also by seeing log statements as shown below.
This article implemented a sample application that you can use as a model for implementing a BPD by communicating with external resources using web services. The article illustrated the flow of data between multiple layers such as web services, UCA and messaging events.
1 comments :
tutorial is really good in BPM and integration services
Post a Comment