cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming REST services

Former Member
0 Kudos

Dear experts!

We have PI 7.4 Java Stack installation and the following scenario. The customer offers 3 REST Services, which can be consumed by us. The given information must be processed in our SAP system. Here is the simple representation of the services:

GetPackageInfo - Method GET – returns a list of packages

GetPackage - Method GET – returns a single package

PachageRespons - Method POST – response to the single package

First “GetPackageInfo” must be called. The result is a list of package IDs. In the second step for each package ID “GetPackage” must be called and the package must be processed in SAP.  Finally the result of processing in SAP to every package must be given back to the customer.  Any suggestions how the implementation in PI can look like?

Thank you in advance!

Daiga

Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor
0 Kudos

Hi Daiga,

Here is an option for possible interface flow:

  1. REST sender in polling mode makes an asynchronous REST call to the service GetPackageInfo, service response with a list of package IDs is sent to a receiver BPM process within SAP PO;
  2. BPM process loops through a list of package IDs and for every entry (package ID), issues a synchronous REST call to the service GetPackage, which is a REST receiver here (the first call step in a BPM process loop), service response is returned back to the caller BPM process;
  3. For every response of the service GetPackage, BPM process issues a synchronous call to the receiver SAP system (the second call step in a BPM process loop), response from the SAP system is returned back to the caller BPM process;
  4. For every response of the SAP system, BPM process issues a REST call to the service PachageRespons, which is a REST receiver here (the third call step in a BPM process loop).

Summarizing this all, there is one BPM process with a loop over obtained package IDs, which triggers calls to the REST service GetPackage and to the SAP system, and translates responses from the SAP system to calls to the REST service PachageRespons within the same loop. Trigger of an interface is REST polling channel which calls the REST service GetPackageInfo.

Regards,

Vadim

Former Member
0 Kudos

Hi Vadim,

thank you for your clear and detailed reply.

The problem is, we don't have a BPM component yet just PI. 

Regards,

  Daiga

vadimklimov
Active Contributor
0 Kudos

Daiga,

Without BPM in the PI system, it will be required to build more interfaces, but shall be still technically feasible:

  1. The first integration flow with async/sync bridge: asynchronous REST sender in polling mode (to call the service GetPackageInfo) to synchronous REST receiver (to call the service GetPackage) and to the asynchronous SAP receiver. Async/sync bridging can be implemented using SAP standard adapter modules - for example, check the blog ;
  2. The second integration flow: asynchronous SAP sender (outcome of processing in SAP) to asynchronous REST receiver (to call the service PachageRespons).

Regards,

Vadim

Former Member
0 Kudos

Hi Vadim,

this is exactly what I was looking for!

Thanks and best regards,

Daiga

Answers (1)

Answers (1)

former_member223322
Active Participant
0 Kudos

Check out the below blog.

~Srini