Use of BPM in File - SOAP - File PI 7.1 scenario - Design approach

Use of BPM in File - SOAP - File PI 7.1 scenario - Design approach


Introduction:-


This weblog intends to help the reader with knowledge of how to use a BPM in a File - SOAP - File scenario, PI is serving as a bridge to integrate file interface and remote client or a webservice provider.

File is an asynchronous interface, whereas SOAP or webservice is a synchronous interface. So a technical difficulty lies here in implementing the integration scenario including file as a sender and SOAP or webservice as a receiver. To overcome this dificulty BPM has been used to implement the scenario.

BPM :- The term BPM (Business Process Management) refers to the organization of business process
processing in general. This includes classic SAP Workflow in the SAP Backend as
well as message processing on the Integration Server.

Note:- Using a BPM in this scenario is one of the possible way for implementing the scenario but not a recommended one. This scenario is also possible without using a BPM . Refer http://forums.sdn.sap.com/thread.jspa?messageID=3075228 for the same.

Assumptions:

  • Knowledge of configuring the File sender adapter and the SOAP receiver adapter
  • Basic knowledge of what a WSDL is and how a Webservice and SOAP message works
  • Basic knowledge of how BPM works.

Designing objects in Enterprise Services Repository

1. Create a new External Definition ED_Convertweight using the WSDL. In this weblog following link has been used to import the WSDL as an external definition:-

http://www.webservicex.net/ConvertWeight.asmx?WSDL

Sample screenshot of an External definition, created from an existing WSDL

image

Fig: 1.1 ED_Convertweight

NOTE: choose category as wsdl

2. Create 2 Data Type DT_ConversionRequest (File Request) and DT_ConversionResponse(File response) as shown below:-

image

Fig: 1.2 DT_ConversionRequest

image

Fig: 1.3 DT_ConversionResponse

3. Create 2 Message Type MT_ConversionRequest and MT_ConversionResponse for above mentioned Data type as shown below:-

image

Fig: 1.4 MT_ConversionRequest

image Fig: 1.5 MT_ConversionResponse

4. Create Service Interface for above mentioned Message type as shown below:-

image

Fig 1.6 Outbound Async interface SI_ConversionRequest_OA for Message type MT_ConversionRequest

image

Fig 1.7 Abstract Async interface SI_ConversionRequest_AA for Message type MT_ConversionRequest

image

Fig 1.8 Abstract Sync interface SI_Conversion_AS with MT_ConversionRequest as request message type and MT_ConversionResponse as response message type

image

Fig 1.9 Abstract Async interface SI_ConversionResponse_AA with MT_ConversionResponse message type

image

Fig 1.10 Inbound Async interface SI_ConversionResponse_IA with MT_ConversionResponse message type

image

Fig 1.11 Abstract Sync interface SI_SOAPinOut with ConvertWeightSoapIn as request message type and ConvertWeightSoapOut

NOTE: For ConvertWeightSoapIn and ConvertWeightSoapOut message types Refer the External Definition created ED_Convertweight (Fig 1.1)

5. Create 2 Message Mapping MM_ConversionRequest and MM_ConversionResponse. Find the sample screenshots below:-


image

Fig 1.12 Request Message Mapping MM_ConversionRequest, File -> SOAP

image

Fig 1.13 Response Message Mapping MM_ConversionResponse, SOAP -> File

6. Create Operation Mapping OM_Conversion_FileToSOAP with SI_Conversion_AS as the Source operation, SI_SOAPinOut as target oparation, MM_ConversionRequest (Request Mapping) and MM_ConversionResponse (Response mapping) as the Mapping programs.

Find the screenshot below:-

image

Fig 1.14 OM_Conversion_FileToSOAP

Request:

MT_ConversionRequest -> MM_ConversionRequest -> ConvertWeightSoapIn

(File request) (Request message mapping) (SOAP request)

image

Fig 1.15 OM_Conversion_FileToSOAP

Response:

ConvertWeightSoapOut -> MM_ConversionResponse -> MT_Conversionresponse

(SOAP response) (Response message mapping) (File response)

7. Create an Itegration Process or BPM as shown below :-

image

Fig 1.16 BPM

a) Receive Step - starts an integration process, receives request message from File sender adapter, define async mode of communication

b) Synchronous Send Step - send message to SOAP receiver adapter and gives the response back , no acknowledgements are send, define sync mode of communication

c) Asynchronous send step - receive the SOAP output message and send it to file adapter

In the above BPM the first step i.e. receive step receives the file and hence triggers the BPM.The second step is a synchronous send step which triggers the call to SOAP, takes the output from SOAP and sends it further to the Asynchronous send step. The third step finally sends response message to a file.

Following is the screenshot for Container elements :-

image

Fig 1.17 Object Area

This brings us to end of the design objects required for this scenario. Save and Activate all the objects created above.

**I might be discussing Configuration objects required for this scenario and testing the end to end scenario in my next blog.

SAP Developer Network SAP Weblogs: SAP Process Integration (PI)