Quantcast
Channel: iPaaS@ORACLE.CLOUD
Viewing all articles
Browse latest Browse all 878

#1031 - OIC Integration Basics - Lab3

$
0
0

Introduction

Lab 3 covers invoking the createOrder integration DB via its REST api. It also discusses logging/tracing and basic OIC error handling.

Let's look again at the Endpoint Metadata for the lab2 integration - 

We'll take the endpoint URL and invoke this from Postman. 

Regarding logging - we will discuss the different tracing levels available with OIC - 

Finally, we'll look at OIC error handling - both at global and scope level - 







 

Lab 3 

Let's begin with invoking the integration via its api.

Invoking App Driven Integrations

Successful call from Postman - so what did I need to configure here? Let's start with the REST connection security definition - 

OAuth is specified, so this is what we have to leverage from our client, in my case, Postman - 

As you can see, I have specified OAuth client credentials. So I need an app that provides me with such. Here I need to go to the OCI console - 






There will be an entry here for your OIC service - the name of your service is shown in the About box in the OIC Designer - 



Clicking on the link for this I entry, I see - 























This is the default OAuth configuration, auto-created for this instance. We could use this, however, it is best practice to create what's known as an Integration Application for this OIC instance -





I add a name and description and then click Next


























Now to adding resources - 

We will add the scopes for the OIC instance - select the instance and click Add


Note the scopes are added - 


Skip the next page and click Finish -

Save the client id and secret that has been generated for you - 

Back to Postman - 

I also need to enter the Access Token URL - this is in the format - https://yourIDCSURL.identity.oraclecloud.com/oauth2/v1/token

You can find your IDCS url here at Domain level -

Postman also requires the scopes - these are the 2 entries we added to the confidential app, so copy these to postman - 

Final step, before we test in Postman - 
add the confidential app to the Service Invoker role, of our OIC instance. Here we need to select the auto-created Oracle Cloud Services entry for the OIC instance - 










Finally, ensure you have activated the confidential app - 

Get a new access token in Postman - 

Use the token and test - 


OIC Logging / Tracing

Logging/tracing is expensive, so, for Production is the way to go, for your OIC Production instance. This level of trace logs all activities executed, but none of the payloads. The data is retained in OIC for 32 days, i.e. covers the calendar month.  

Audit adds a bit more - here all inbound and outbound payloads are logged, however, the payload data is only retained for 8 days.

Debug logs all activities and payloads as well as transformations. This is very useful when developing your integrations, however, it is automatically set back to Production, after 24 hours. 

Tracing can also be set globally - 








Many customers need to retain some of the data that flows thru the integrations for compliance purposes, e.g. the ability to prove when order number 2112 was processed and what the outcome was. 

OCI Logging and OCI Logging Analytics, 2 other OCI services often used in concert with OIC, can be very helpful here. More about them in a future post in this series. However, one could also use a business database (e.g. ATP) to store such data.





Viewing all articles
Browse latest Browse all 878

Trending Articles