Sunday, February 6, 2022

OIC - Retry logic

Why we need retry logic: Suppose we have an API (any ftp call or service call) which we are calling from OIC. During the invoke, sometimes we are getting timed out or other errors. In this case, we may need retry logic to retry the call for a business limited attempts after specific time of intervals.

Logic steps:

  • Take an assign with 2 variables.  runiteration="true" and counter=number(1)
  • Take a while activity and use the condition runiteration="true"
    • Take a scope
    • Call the API which can fail
  • Go to fault handler >> default handlet
    • Take a switch and use condition counter <4 
      • Add a wait for 59 sec
      • Increase counter = counter +1
    • Otherwise add runiteration = "false"

Detailed steps with POC screenshots: 

This will retry 4 times to read file from a ftp locarion.
























Friday, February 4, 2022

OCI links

OCI links:













OIC - Secure Rest API with OAuth Security policy

OAuth is open authentication protocol to protect the resources. It is the industry standard protocol for authorization

It is authorization framework enables a third party application to obtain limited access to an HTTP service, either behalf of a resource owner or by allowing the third party application to obtain access on its behalf.

High level Steps:

  • Register a Trusted application in Identity Cloud Service(IDCS)
  • Extract the client id, client secret & scope
  • Obtain the access token
  • Hit the rest endpoint using access token
Detailed steps:

Login to IDCS


Search with Id


Go to application page


Add an application


Confidential application


Provide the app name


Provide allowed Grant type as required. We will use resource owner here.


Add scope


Select  myoic url for api call.


Select both.


Select the 1st url till all.


Provide access token properties.



Click finish


Application added.

 
Activate



Copy the client id and secret.


Copy the scope url till all.


Open postman and provide idcs url with /oauth2/v1/token

Select Oauth and provide username as client id and password as client secret.


Go to body and select x-www-form-urlencoded and provide grant_type, scope, username as oic user and password
Hit send

You will get the access token.


Below url you can use to see all the api trigger services.


Open the api url and authorization in header section as bearer access token.


Following rest trigger connection where we have select security policy as OAuth 2.0




Wednesday, February 2, 2022

ODI - How to track load plan step package scenario behind code from session id

Follow the Steps:

Go to operator tab => Load plan executions and select the plan 


Expand the steps and select the SCEN and click on session id.
 

Click on package steps


Expand and select the operation and open session tasks.


Go to code


Now you can see the execuated code.



OCI - DB check Active sessions in Performance Hub

Suppose we have ADW database configured in OCI and We are running ODI load plans which contains multiple Package scenarios. Each scenario is inserting or marging data to configured ADW database. Sometimes the scenario is taking longer time like more than 2 or 3 hrs but not completing the process and got stuck. How we know that the particular process got stuck.  Using performance hub, we can easily track the sessions when it is active or idle. Based on the perfomace metrics, we can take further decision to kill the stuck process and restart the failed scenario again.

Steps to check performance hub:

Login to OCI console and navigate to Databases.


Click on Autonomous Data Warehouse


Choose compartment and select adw db


Click on performance tab or you can also go from Databse actions.


Performance page will open. It will show all the sessions time while idle or active. Got to SQL monitoring section and check all the running sqls.


ODI - DB Query to check sessions status if active

Query:

Select sid,serial#,program,module,status,username,schemaname from gv$session where status ='ACTIVE'


This query is very useful to see all the active processes even we can see the ODI sessions here.

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...