Till now we have created a Web Dynpro project and a Process Composer project, now its time to create Service Interface that would be triggering the Start of the BPM Process that we designed. We will create a new WSDL that would contain the Structure for the data that we need to pass from the Web Service to the Process Task. So lets get started:
Step 1: Create a WSDL
Expand the Service Interfaces and right click on it, from the context menu choose New > WSDL. Give the filename as StartProcessSI.wsdl and press the Next button.
Define the Target Namespace
Step 2: Open the WSDL
Double click on the WSDL name to open and then click on the Arrow just next to the input parameters to define the schema
Step 3: Create Structure
Right click on the Types and choose Add Complex Type from the context menu.
Name the Complex Type as desired
Open the complex type to add elements to it. Right click on the complex Type name and choose Add Element from the context menu.
Define the Cardinality as 1..1 for the complex type
Step 4: Set the interface for the Start event
Point to the Start event in the process and open the properties to select the Interface. Choose the newly created Service Interface against the Interface for the start event.
Step 5: Output Mapping
Complete the Output mapping from the Servie Interface to the Data Object as depicted below:
Build and deploy the development component and navigate to WSnavigator > Service Test > Select Provider Systems and press Search
Choose the StartProcessSI and click Next
Expand the Service Information tab and copy the URL of the WSDL
Using this wsdl link you can create a Adaptive Web Service Model and then use that in your Web Dynpro Component to invoke the Start event using this WS from a portal Iview. Or else you can try testing the Process by executing the Web Service from WSNavigator which I did for this example. Following inputs were sent:
Name: Arafat Farooqui
After invoking the Web Service, a task is visible in potential owners' (Defined at task level in our case) UWL.
On opening the task, a message is displayed based on the inputs and logic.
Complex schemas can be defined using the WSDL and used for complex the scenarios.
Links to Other Parts:
Introduction to SAP Netweaver BPM: Part 1 [Part I: An introduction to SAP Netweaver BPM]
Introduction to SAP Netweaver BPM: Part 2 [Introduction to SAP Netweaver BPM: Part 2]
Introduction to SAP Netweaver BPM: Part 3 [Introduction to SAP Netweaver BPM: Part 3]