This post demonstrated an example of ASync/Sync bridge using adapter module.
High level overview:
An input file send asynchronous request to SAP PI, SAP PI route the request to synchronous RFC to return synchronous RFC result. SAP PI route the synchronous RFC result to asynchronous response and create output file.
2 main trick that make this Async/Sync bridge happened:
a) Sender file adapter CC_FILE_SND configured with module RequestResponseBean and RequestOnewayBean.
b) Outbound Async Service Interface SI_FNAME_LNAME_OUT_ASYNC contain both Request and Response message type. This is different because normally Async SI only contain Request message type.
Explanation on above flow with focus on CC_FILE_SND:
a) BC_Sender send input message to CC_FILE_SND
b) First module RequestResponseBean change the message type from asynchronous to synchronous by changing the message header.
c) The ReqRespBean parameter “passThrough” value “true” will pass the message to next module chain, which is CallSapAdapter.
d) After CallSapAdapter processed, the processing flow will route to OMFILE2RFC2FILE, go through Outbound SI, request message mapping, Inbound SI, call CC_RFC_ER1_RCV synchronously to return RFC response message.
e) RFC response message go through response message mapping, mapped to response MT_FULLNAME, and go all the way back to original caller module at CC_FILE_SND.
f) Third module ResponseOnewayBean change the message type from synchronous back to asynchronous.
g) Receiver system and receiver channel were determined from parameter “receiverSystem” and “receiverChannel” respectively.
h) Finally, the message delivered to receiver system via receiver channel in asynchronous way.
Done! Above highlighted the “different” stuff that need to be done, for this Async/Sync bridge configuration. The rest configuration and setup will be normal standard way.
Below long list show screen capture of various ESR, ID and RWB message monitoring, for the sake of completeness. Check the last part message log of RWB message monitoring, there show useful processing trace on what actually happened at certain steps, useful for understanding as well.
Enterprise Service Repository Objects:
Integration Directory Objects:
Thanks for following till the end 🙂