cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.31 - How to set an Async/Sync with multi mapping?

RafaelVieira
Active Participant
0 Kudos

Hi experts,

I need to setup a scenario File -> REST -> Multiple Files.

Initially I though I could use simple async/sync bridge:

File (async) --> XI --> REST (sync request)

REST (sync response) --> XI --> 0..N Files (async)

However I'm not sure how I could design it with 2 operation mappings, as the 2nd Op Mapping would have to be designed for multi mapping.

Anyone would please share how I could design this scenario if it's possible with async/sync or would it be done only by using BPM?

Tks!

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi Rafael!

You can do it right as you said. As far as you change response message type from sync to async and replace interface to async with adapter modules you can use multimapping in second OM as it acts in async mode.

Regards, Evgeniy.

RafaelVieira
Active Participant
0 Kudos

Hi Evgeniy,

Can you please elaborate a bit more how would the ESR objects be?

Thanks!!

former_member190293
Active Contributor
0 Kudos

Hi Rafael!

First ICo:

Async interface for sender (File) with message type.

Sync receiver interface with request/response/fault message types (Rest).

Message mapping (if needed) to transform sender message to Rest request.

Operation mapping with request mapping only assigned to it (as response mapping will be processed by second ICo).

Second ICo:

Async interface for Rest response (Sender) with response message type.

Async receiver interface for your multiple files.

Message and operation mappings for Rest response transformation to multimessage structure (0..unbounded).

In receiver communication channel use adapter modules to build async-sync bridge. Take a look at screenshot above for example.

Refer to this blog to learn more:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2014/01/28/generic-pi-async-sync-bridge-conf...

Regards, Evgeniy.

RafaelVieira
Active Participant
0 Kudos

Tks Evgenily!

Very clear now.

Just one question: still in 1st ICO, how can I map an Async interface to a Sync one? It would throw an error in operation mapping.

former_member190293
Active Contributor
0 Kudos

Hi Rafael!

No, it won't . It will just warn you about that. And RequestResponseBean/ResponseOneWayBean in module configuration will do the rest.

Regards, Evgeniy.

RafaelVieira
Active Participant
0 Kudos

It worked as you described.

Tks Evgeniy!

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Rafael,

You can use a UDF to do the REST call. However, take note that if anything fails in the pipeline, the message will be persisted and will be executed 3 times (you don't want that to happen).

BPM would be the clean solution though.

Regards,

Mark