Extending OOTB OIC Recipe - Extract New Hire Info (Continuation of Part 1)


In the previous blog we have seen how to Install and Run a Recipe - Extract New Hire Info from Oracle HCM Cloud. Extract definition is created and executed in HCM Cloud as a pre-requisite for the OOTB Recipe to work. In this blog we will create an Integration Flow in OIC to extend and automate the whole process of executing the Extract instead of having it done manually from HCM Cloud. Also, there has been incredible uptake of cloud storage buckets which provides a simple, low cost mechanism to store both structured and unstructured data. Data Archiving is one of the key use cases for extracts. We will store the extracts in an OCI Storage bucket as part of the Integration Flow.

Usecase Flow


Oracle HCM Cloud Extract

  • A Valid Oracle HCM Cloud Extract Definition
  • Configure Webcenter Delivery Option and an Integration Name
Note: Do not Submit the extract. We will invoke the same from OIC

OCI Object Storage Bucket

  • Login into OCI Console and Navigate to Object Storage, Create a Bucket

  • In order to interact with Object Storage from OIC, the REST Adapter will be used to invoke REST API. For OCI API authentication, an API signing key pair needs to be generated for the API User. Generate the RSA Key in PEM format using OpenSSL
    • openssl genrsa -out oci_api_key.pem  2048
    • chmod go-rwx oci_api_key.pem
    • openssl rsa -pubout -in oci_api_key.pem -out oci_api_key_public.pem
  • Navigate to Identity->Users select the User to add API Key. Select API Keys and add API Key

Make a note of Fingerprint after the Key is added

Creating OCI Connection using REST Adapter

Configure Connectivity

  • Connection Type REST API Base URL
  • Get the object storage endpoint from here as per your region

Configure Security

  • Security Policy - OCI Signature Version
  • Tenancy OCID - OCI Console -> Administration -> Tenancy Details
  • User OCID - OCI Console -> Identity -> Users -> Select the User Account being used
  • Private Key - Key pair generated earlier
  • Fingerprint – Copy the finger print when public key is added to the user

Designing the Integration Flow

Below is the current Flow of the OOTB Recipe (Refer my earlier blog). We will extend this further as per the logic in the sequence diagram.

This is the final flow after the implementation.

I have provided the .iar for your reference. Lets's review the important parts of the design

  • Define Schedule parameters

  • Use HCM Connection and configure FlowActionsService -> submitFlow operation. This will trigger the Job in HCM Cloud 

  • In a "While" construct invoke FlowActionsService -> getFlowTaskInstanceStatus

  • In a Switch Condition check if the result of getTaskInstanceStatus is "COMPLETED". Extract the New Hire file from UCM
  • Use the OCI Rest adapter connection which is configured and provide a placeholder for URI Params

  • Define the Request payload as binary and media type as application/octet-stream

  • Map the file reference from extractFile response to the streamReference in OCI Object storage

Activate and Run the Integration

Run the Integration with appropriate values

View Extract Results in HCM Cloud. 

Once the job status is completed verify the New Hire Extract in OCI Object Storage


While designing the integration we need to keep a few things in mind. We can decouple scheduler and integration logic (getFlowTaskInstanceStatus logic) into 2 difference flows and let scheduled Integration just invoke the child integration using Fire & Forget pattern so that we are not blocking the Scheduler threads. The child integration can expose a REST interface with just Request defined to make it Asynchronous Integration flow.

References: Oracle HCM Data Loader: User Guide (Doc ID 1664133.1)