cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple receivers - How can one of them be synchronous?

Chandra_Hota
Participant
0 Kudos

Hello All,

Our current scenario is that a message from a 3rd party system comes into ESAP XI asynchronously (thru SOAP). This message gets split into 2 messages in XI, and both of them are sent as 2 different messages to CRM( thru 2 different proxies) .

Now, we want to make this a synchronous communication, where the 3rd party sender system sends the message synchronously and waits for a response. This message needs to be split in the same way into 2 different messages in XI, and both of them should be sent to CRM as 2 different messages. But, the 1st message should send back a response to XI, which should be sent back this response to 3rd party system. The 2nd message form XI should be sent to CRM asynchronously.

I know how to achieve this using BPM. But, is there any way to achieve this with out using BPM? Please let me know.

Thanks in advance, Chandra

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member181985
Active Contributor
0 Kudos

This solution might look little strange, but it works. If your PI version is >= 7.1, try the below steps

Only one scenario, i.e., 3 rd party --> XI --> first proxy (synchronous). In XI mapping have 3 graphical mappings. 

(i ) In first graphical mapping read the original complete payload using "Return as XML" funtion from top source node and then pass this to an UDF code which can create attachment with name e.g., "OriginalPayload.xml". The UDF should return 1 and its output should be mapped to target structure top most node.

(ii) In the above graphical mapping perform mapping between source (3rd party) and second proxy structure.

(iii) Now create a second graphical mapping between second proxy structure and 3 rd party source structure message types. Read the second proxy content and create an attachment with name e.g., "secondproxy.xml". Then read the previously created attachment "OriginalPayload.xml" and then pass this data to output structure in byte mode.

(iv) create third mapping between source(3 rd party) and first proxy structure. Remove the extra attachment i.e., "OriginalPayload.xml" either in this step or in previous step-iii last stage.

Note:- The above mapping functionality can be achieved using a Java mapping in much simpler way i.e., in one mapping.

In CRM system, change the first proxy code a little bit, so that it can call the second proxy in asynchronous fashion apart from its original functionality.

Steps:-

(i ) add the extra functionality in the proxy to read the attachment which is intended for second proxy.

(ii ) call the second proxy asynchronously with the read attachment content using some wrapper mechanism e.g., using sample SOAP or HTTP client code and post the read attachment to CRM inbound HTTP adapter with second proxy headers. Link: http://scn.sap.com/people/praveen.gujjeti/blog/2010/01/14/calling-abap-proxies-using-soap-and-http-a.... There should be much better alternate ways available in proxy/ABAP code to call the second proxy. Just explore or wait for expert opinions.

Former Member
0 Kudos

We had similar requirements and we implemented solution with intermediate folder.

1. PI receives a message synchronously, splits it into 2 messages using 1:n message mapping

2. Then Java mapping is called that saves first message into intermediate folder and returns second message.

3. You're passing output (i.e.) second message to sync CRM proxy and returning response to 3rd party system

4. Another interface is picking up files from intermediate folder and sending it to async CRM proxy. 

There are few advantaged of this approach, main of them is a best performance possible. This is because operation of saving file on disk takes literally couple of milliseconds contrary to http call to http adapter or direct RFC call to CRM.

Disadvantages are obvious - you need to maintain intermediate folder just for your internal purposes, no guarantee of messages would be delivered in "near same" time.

Former Member
0 Kudos

that is not possiable with out bpm because sender service interface mode is  synchoronus and sender communication channel also best effort .

if without bpm :you have to create  2   scenarios

one is soap <-> proxy

2 one is soap -> proxy

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>I know how to achieve this using BPM. But, is there any way to achieve this with out using BPM?

When you do interfaces from one to multiple target systems and expect response from the target systems then bpm is the only solution.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>I know how to achieve this using BPM. But, is there any way to achieve this with out using BPM?

no, you cannot have multiple receivers in case of a sync call - so it can only be done with a BPM

but you can do it like this

sync -> CRM -> sync reponse but also as a second step send the same from CRM again to PI and to CRM async (it's the same message so it should not be an issue)

maybe this could be a solution ?

Regards,

Michal Krawczyk