Quantcast
Channel: SCN : All Content - SAP Process Orchestration
Viewing all articles
Browse latest Browse all 1235

PO REST to REST iFlow Scenario

$
0
0

In this blog I am going to show you how to achieve RESTFullness with PI REST Adapter. Use this blog as a hands-on starting point to your RESTFull journey. I have followed the blog series at http://scn.sap.com/docs/DOC-60854 and it’s really full of information. With this blog I am going to share the example I prepared to practice REST Adapter, so as to give you head start.

 

Scenario

I am going to use the rest service http://www.thomas-bayer.com/sqlrest. This service gives information about Customer, Invoice, Item & Product. The iFLOW's that I created are REST to REST (just to keep it simple and show both sender and receiver configurations).

 

Concepts

The REST call in my example can go up to three levels deep. So I created three different iFLOW's representing three different entities.

Level 0 (IFLOW: Test_R2R): http://HOST:PORT/RESTAdapter/sqlrest/

Level 1 (IFLOW: Test_R2R_Level1): http://HOST:PORT/RESTAdapter/sqlrest/CUSTOMER/

Level 2 (IFLOW: Test_R2R_Level2): http://HOST:PORT/RESTAdapter/sqlrest/CUSTOMER/11/


iFLOW

Please import the attached iFLOW’s to run the scenario in your PO SP8 and above.

 

Some important REST adapter configurations

Sender REST Endpoint is same for all three iFOWS:

  Img1.png

 

 

Since Level 0 is the default so use “/” in the URL Pattern in the sender REST.

Img2.png

 

Level 0 Receiver Rest is to be configured as follows

Img3.png

 

Level 1 represent Customer or Item or Product therefore in this configuration we use patters to capture the details of the Level 1 as “resource”. The Level 1 sender REST adapter need following configuration.

Img4.png

 

In the Level 1 receiver REST adapter the “resource” is read from the dynamic configuration and is used here to generate the right URL.

Img5.png

 

For the Level 2 sender REST adapter we now configure two parameters “resource” & “id”.

Img6.png

 

In the Level 2 receiver REST adapter the values of “resource” and “id” are read from the dynamic configuration to generate the right URL.

Img7.png

 

Good Luck!!


Viewing all articles
Browse latest Browse all 1235

Trending Articles