Skip to Content

Hello All,

This document guides you with creation of a simple BPM Process along with Integrating a PI Service Interface in the Process. The objective of this document is to demonstrate a perfect example of using all components of the PO Suite (BPM, BRM & PI).

Scenario:

We will develop the BPM with a ‘Travel Expense Approval’ scenario in mind, where, based on the Employee Level & His Travel Expense, the BRM will decide if it is Approved or Rejected. This BRM will be called by a PI Service Interface.

The Start Trigger (Web-service) of the BPM process will consist of 2 Input Parameters : Employee_Level & Expense Amount.

These input parameters will be passed from BPM to PI Service Interface, which, in turn, will call a BRM web-service to check the Business Rules. The BRM web-service will return the corresponding output value to PI, which will again be passed to BPM for further usage.

So the flow would go like this: BPM–>PI–>BRM–>PI–>BPM.

Prerequisites:

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.

3. A developed PI Service Interface which calls the BRM Ruleset for Travel Expense Approval. For our scenario, the BRM Ruleset Decision Table looks like this:

PI1.jpg

Note: For more details on hot to create a BRM, please refer this step-by-step document.

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 Service Interface) –>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:

PI1.jpg

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:

PI1.jpg

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

PI1.jpg

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

PI1.jpg

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 Service Interface 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 Service Interface as a WSDL. Right-click on WSDL Folder in Project Explorer–>Import WSDL–>Select the appropriate method (Enterprise Service Repository)–>Next:

PI1.jpg

PI1.jpg

14. Enter credentials –> Next:

PI1.jpg

15. Expand the folders to the appropriate Service Interface, select it –> Finish:

PI1.jpg

16. Once the Service interface is successfully imported to your BPM Project, you will see the corresponding packages in the ‘WSDL Files’ Folder:

PI1.jpg

17. 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

18. Name the WSDL File –> Next:

PI1.jpg

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

PI1.jpg

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

PI1.jpg

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

Right-click on output tab –> Delete:

PI1.jpg

22. 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

23. 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

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

PI1.jpg

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

PI1.jpg

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

PI1.jpg

27. 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

28. Name the Trigger –> Next:

PI1.jpg

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

PI1.jpg

30. 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

31.

Now, we need to call the PI service Interface in the Automated Activity.

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

PI1.jpg

This takes care of the Automated Activity.

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

PI1.jpg

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

PI1.jpg

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

PI1.jpg

35. 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 Service Interface):

PI1.jpg

C. Automated Activity –> Process Context(Output of PI Service Interface, back to BPM Process Context):

PI1.jpg

36. 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

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

PI1.jpg

38. Finally, check for any Build-errors.

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

PI1.jpg

39. 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.

40. 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.

10 Comments

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

  1. Rohini Potham

    Hi Sid,

    I have tried the above scenario.

    I have few doubts to clarify.

    Do we create ICOs for the above objects (I have created one, SOAP(XI-3.0) –> PI -> FILE)

    Also, I have created a rule set and decision table as mentioned, where is it being used?

    I have developed ESR part and Process model and also IFLOW.

    To test, I have started the process from process repository and entered expense amount and level, the process task has been created but it is in error state and my IFLOW does not work.

    It is my first scenario in NWDS.

    Kindly let me know the above, so that i can make it success.

    Thanks in advance.

    Regards,

    Rohini

    (0) 
  2. sateesh adma

    Hello Siddhant,

    I have followed all the steps and created my first BPM and deployed it successfully.

    But when am testing it from ws navigator getting the attached error, can you please check this error and let us know what could be the problem.

    /wp-content/uploads/2016/09/bpmerror_1038322.png

    Thanks,

    Sateesh

    (0) 
  3. Karan Kholakiya

    Hello Siddhant,

    It is a very nice blog BPM and BRM perspective.

    But in this blog, what things need to be done on PI side is missing, also how PI->BRM->PI will get called or connected is missing.

    Will you please let me know what things will need to do in PI side (ICO flow details with data) and how BRM get invoked through PI,please let me know.

    In above blog i checked there are 4 SI has been created in PI side, BPM (out & in) and message (out & in). what this interfaces contains data?

    I understood BPM out will contain (ExpAmnt and EmpLevel) and BPM in will contain (Approval details) but what is message out and in about?

    Thanks & Regards,
    Karan Kholakiya

    (0) 

Leave a Reply