Dear SCN Friends,

I would like to share my knowledge on calling BRM Rules from BPM in different ways.I would like to take a simple example/use case to explain this .

Use Case:

SYSA sends EmployeeID and OrgName to SYSB .SYSB responds back with Region and Grade of the employee .Now by passing Grade and Region will get Hike% from BRM rules service and sends this infomation to SYSC.

Here my main focus is on calling BRM rules from SAP PO mapping(Using SOAP Lookup) and calling Directly from BPM by taking above use case to explain.

Step1:Create an External Definition in PO and select the wsdl which was downloaded in our previous blog BRMRulesCreation.

/wp-content/uploads/2014/11/wsdl_final_593915.jpg

CASE1:Calling BRM Rules from Message Mapping.

Step2:I have developed a BPM (Async-Sync scenario) to call SYSB and get the Region and Grade values of an employee and pass those values out from BPM.

In the below flow diagram highlighted send step represents the step which holds the structure with values for (EMPID,OrgName,Region and Grade).

Usecase1.jpg

Step3:Create a mapping between Source Msg (BPM’s Output Msg) and Target Msg (Will send this Msg to SYSC).In this Mapping will get the value for Hike% from BRM rulesset by using SOAP look up.

Map_UDF.jpg

Give SOAP communication channel as an Input to Function Library(UDF)

Sign.jpg

Below is the code for BRMLookup.

Code123.jpg

Code234.jpg

Code345.jpg

Step4:Create an Operation Mapping for the above Message Mapping

OM.jpg

Step5:Now Create an IFlow between BPM and SYSC.

Select your Operation mapping by clicking on browse .Now click on Lookup Channels.

IFlow1.jpg

Click on Assign Channel and select your SOAP channel for BRM Lookup.

Iflow2.jpg

Channelss.jpg

We get the above url from NWA–>SOA–>Application and Scenario Communication–>Single Service Administration

Testing.jpg

GIve your project relevant filter say “*empHike*”–>Click on Go–>Select your WSDL port type Name–>Click on WSDLs–>

Testing1.jpg

Double Click on above url,then below window opens.Copy the highlighted url and put the same in SOAP channel in PO to invoke BRM Rulesset.

/wp-content/uploads/2014/11/url_594446.jpg


CASE2:Calling BRM Rules from BPM.


Step6:Create Service Interface for the above Imported BRM WSDL.

SI.jpg

Import the above wsdl into BPM .


Step7:


SyncCall_Region_Grade :Sync send step to get Region and Grade values for the given EmpID and OrgName

BRMLookup:Sync send step to fetch Hike% for the given Region and Grade

SendToRecSystem:Async send step to send employee details to SYSC.

NewBPM.jpg

In two different ways we can invoke BRM Rules service .

1)Using an IFlow between BPM and BRM Rules service.

2)Direct calling from BPM to BRM Rules service.

I’m sure most of you are well aware on 1st option ,so I will take 2nd option to explain.

Go to NWA–>SOA–> Application and Scenario Communication–> Application Communication

NWA.jpg

Select your Software Component and service group of type WS and change to Edit mode.

/wp-content/uploads/2014/11/1_594819.jpg

Switch to tab Configuration, and click on Configure Manually

/wp-content/uploads/2014/11/2_594774.jpg

Give the url and credentials to connect BRM rules service.

/wp-content/uploads/2014/11/3_594776.jpg

Click on Next to confirm the service endpoint.The Web Service endpoint URL is automatically set based on the binding information within the WSDL. Navigate to couple of screens by clicking on Next and at end click on Finish.

Save the service group.

Steps8:Testing the Scenario


   Input Payload:

Test_InpFile.jpg

    Input File placed in SYSA

Test_InpFile1.jpg

  Output File placed in SYSC

Out1.jpg

  Output Payload:

OutDisp.jpg

Documentation really tested my patience .Any how ,Happy Learning .Enjoy

Regards

Venkat

To report this post you need to login first.

5 Comments

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

  1. Qingfeng Li

    Very details about 2 common approaches to involve BRM. But always have a pity about no standard SOAP Lookup function in ESR mapping. Many customer complain about this… They have to develop own UDF to do the SOAP Lookup.

    (0) 
  2. Raj .

    Hi,

     

    Very nice blog. I implemented it but receiving an error as below. please suggest what is the issue.

     

      Port type name of loaded WSDL does not match the port type name of the Service Reference. WSDL port type name: “{http://www.sap.com}EmpHikeCalcRulesPortType”. Service Reference port type name: “{http://www.abc.com/BRM}SI_HikeCalc_Abs_Sync_Out”.

    Br,

    Raj

    (0) 

Leave a Reply