Hello All,

With the overwhelming boom that SAP PO Suite has been receiving so far, we see new challenges coming up in all the 3 components.

We face many hurdles when it comes to integrating BPM with BRM, BRM with PI, PI Components with BPM etc.

This document captures one such important facet of integration.

Objective:

This document will have a step by step approach as to how we can import a PI Operation Mapping into SAP BPM in NetWeaver Developer Studio 7.3 EHP1.

Scenario:

The Scenario of this document will be the same as in this document. The only difference will be that instead of importing the PI Service Interface, we will be importing an Operation Mapping from the PI Repository for further processing.

Prerequisites:


Check the NetWeaver Developer Studio for the following:

1. Check for Proper Connection between NWDS and PI Enterprise Service Repository in Window–>Preferences–>Web-services–>Enterprise Service Browser. Enter the appropriate details and check if the Service Repository is reachable.

2. The PI Connectivity is done properly in Windows–>Preferences–>PI Tools Configuration–>Connections.



Let’s get started:


1. Open the ‘Development Infrastructure’ perspective in NWDS. Right-click on the SCA –> New –> Development Component:

PI1.jpg

2. Select ‘Process Composer’ perspective –> Next :

PI1.jpg

3. Name the vendor, the component,provide description –> Finish:

PI1.jpg

4. The project will be created with the following structure:

PI1.jpg

5. Now, to create a process in the BPM Project, right-click on Processes –> New Process:

PI1.jpg

6. Name the Process, Pool and Lanes –> Finish:

PI1.jpg

7. The created Process, along with the Pool and the Lanes should look like this:

PI1.jpg

8. Now, depending on the process flow design we will drag and drop various activities and events from the Design-palette into the process flow and link them according to the flow:

PI1.jpg

9. Now, according to our scenario, we need the Business Flow as follows:

Start-Event (With input parameters) –> Automated Activity (To execute PI Operation Mapping) –>Notification Activity (To send an email to the recipient)–>End.

As we already have the Start and End Event by default, we only need Automated Activity and Notification Activity from the Palette:

PI2.png

10. Now that the process design is ready, we need to create the data holders which will hold the data throughout the process execution. These are called Data Objects in BPM. They are available in the design-palette:

/wp-content/uploads/2014/09/pi5_546857.jpg

11. Now, to set Data-type for the Data Object, Right-click on the Data-object –> Properties–>Select Data-type from the dropdown:

/wp-content/uploads/2014/09/pi5_546857.jpg

12. Similarly, create 2 more data objects- One to store the Expense amount(int) & one to store the Approval Result(string):

/wp-content/uploads/2014/09/pi6_546859.png

13. Now that the process design and the data holders are ready, we need to integrate the external components required for each of the design activities in the process design.

In our case, we need only the Operation Mapping to be integrated into the automated activity. (Notification Activity does not require any external entity).

Entities such as Service Interfaces, Web-services etc. are converted to WSDL files and then integrated into the BPM Project.

So, we will integrate the Operation Mapping.

Right-click on ‘Operation Mappings’ in Project Explorer–>Import Operation Mapping–>Enter Credentials–>OK:

/wp-content/uploads/2014/09/pi7_546863.png

/wp-content/uploads/2014/09/pi8_546864.png

14 . Expand the folders to the appropriate Operation Mapping–>Select it–>Finish:

/wp-content/uploads/2014/09/pik_546876.png

15. Once the Operation Mapping is successfully imported to your BPM Project, you will see the corresponding packages in the ‘WSDL Files’ Folder under Operation Mappings:

/wp-content/uploads/2014/09/pil_546877.png

16. Now that the Service interface is ready for use in the BPM Project, now we will create all the components required for each and every activity in the process design.

As we know that the Start Event of every Process is nothing but a web-service, we need to create the corresponding WSDL for the Start Event in the BPM Project.

Right-click on ‘Service Interfaces’ –> New WSDL :

PI1.jpg

17. Name the WSDL File –> Next:

PI1.jpg

18. Keep the protocol unchanged (SOAP) –> Finish:

PI1.jpg

19.You will see the design of the created WSDL:

PI1.jpg

20. As our Scenario is Asynchronous, we will delete the output parameters.

Right-click on output tab –> Delete:

PI1.jpg

21. Deleting output from design is not enough. We need to delete the output parameter from the XML code of the WSDL too.

Click on ‘Source’ tab –> Delete the ‘/output’ tag:

PI1.jpg

22. Now go to the design tab again. As we need to add Input Parameters (Employee_Level,Expense_Amt), we will add these as Input for Start Event:

Click on the Arrow next to ‘input’ tag:

PI1.jpg

23. Double-click on the parameter name to edit:

PI1.jpg

24. Double-click on the data-type to change:

PI1.jpg

25. Repeat Steps 23-24 to create the following structure:

PI1.jpg

26. Now, the Asynchronous WSDL is ready to use. Now, each and every start event is associated with a trigger. In our case, it will be a Message Trigger. So we will create a new message trigger.

Right-click on ‘Event Triggers’ –> New Message:

PI1.jpg

27. Name the Trigger –> Next:

PI1.jpg

28. Select the WSDL we created for the Start Event from the Dropdown for the Service Interface and click Finish:

PI1.jpg

29. The trigger is now created. Assign this trigger to the Start Event.

Right-click on Start-event –> Properties –>Event Trigger –>Select from Dropdown:

PI1.jpg

30.Now, we need to call the PI Operation Mapping in the Automated Activity.

Right-click on Automated Activity –> Properties –> Interface –> Select from Dropdown:

/wp-content/uploads/2014/09/pin_546891.png

31. Now, right-click on the Notification Activity –> Properties –> To–>’Choose’ UME User (As the recipient of the email):

PI1.jpg

32. In the next dialog box, enter the search criteria –> click on the desired recipient from the result-set –> Add –> OK:

PI1.jpg

33. Now that the recipient is set, we need to add the Subject and the Content of the email in the ‘Mail’ Property:

PI1.jpg

34.Now that all the properties of all the design activities are set, we need to do the data mapping:

  1. Start Event –> Process Context:

PI1.jpg

B. Process Context –> Automated Activity (Passing input to PI Operation Mapping):

/wp-content/uploads/2014/09/pio_546892.png

C. Automated Activity –> Process Context(Output of PI Operation Mapping to Process Context):

/wp-content/uploads/2014/09/piu_546893.png

35. Now that the data mapping is complete, the BPM Process is complete and ready for use.

But for Troubleshooting and Admin purposes, we assign an administrator to the BPM Process.

Right-click on Pool –> Properties:

PI1.jpg

36. In Pool Properties, Set the Administrator in the Administrator property, similarly like we selected the recipient of the email in step # 31 & 32:

PI1.jpg

37. Finally, check for any Build-errors.

Right-click on BPM Project –> Development Component –> Build:

PI1.jpg

38. Check the status in the Infrastructure Console:

PI1.jpg

Note: There are no build errors but warnings are always going to be present. However, these warnings do not affect the deployment.

39. Now that there are no build errors in the project, it is ready to be deployed onto the server and used. Deploy the DC.

Right-click on the BPM Project –>Development Component –> Deploy:

PI1.jpg

Now, our BPM is ready to use on the server. You can test it in 2 ways:

1. Trigger the BPM Start Web-service in WSNavigator

2. Start the Process Manually from the Process Repository.

Hope this document helps people in some way or the other.

Please let me know if I have mentioned anything incorrectly in this document.

Cheers.

Sid.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply