Showing posts with label OIC. Show all posts
Showing posts with label OIC. Show all posts

Thursday, May 21, 2020

FBDI Introduction


FBDI stands for File Based Data Import. It is a pattern provided by Oracle to have the data loaded into Oracle ERP Cloud. Its usually used for

Data volume to be imported is high.
Usually used to be loaded from FTP/SFTP locations to CloudERP.
OIC is the preferred choice for importing the files.

Below documents have complete information on FBDI and types of FBDI. These are the very useful Oracle links.

https://docs.oracle.com/en/cloud/saas/financials/r13-update17d/oefbf/Financials-File-Based-Data-Imports-Overview.html

https://docs.oracle.com/en/cloud/saas/financials/r13-update17d/oefbf/FBDIOverview.html



In the FBDI series, I will give detailed process of importing FBDI file to CloudERP.

Thursday, May 7, 2020

OIC Integration using FTP Adapter created locally in WINDOWS 10, Local Machine

In this POST, I will provide detailed steps on how to use a FTP adapter in OIC using local FTP created in WINDOWS 10 machine  

Steps to create a scheduled integration in OIC using FTP adapter using local WINDOWS FTP. You can go through these links. 

Create FTP server using WINDOWS 10 locally: here  
Why is an ICS Agent needed: here 

  •             Login to OIC àIntegrationàDesigneràAgentsàCreate Agent Group (Give below New Agent Group -Information)

Agent Group Name

DhireshWinLocalAgentGroup

Agent Type

Connectivity Agent

Description

POC purpose


  • Download Connectivity Agent. Save it to C:\OIC\oicAgent\

C:\Windows\system32>cd C:\OIC\oicAgent\oic_connectivity_agent
C:\OIC\oicAgent\oic_connectivity_agent>java -jar C:\OIC\oicAgent\oic_connectivity_agent\connectivityagent.jar
Enter your OIC username : OICUserName
Enter password for username : OICPassword
No Proxy Configuration Detected
Checking for trusted certificates ...
Making call to check OIC Version ...
Making call to check Agent group availability ...
Updating Agent with configuration details ...
Making call to register new agent instance ...
Making call for getting agent app id & keys...
Done with Agent installation & configuration... Starting Agent for message processing.
Agent started successfully...Now available for new messages...

  •            Ensure that the agent is running - OIC àIntegrationàMonitoringàAgentsàMonitor Agents


  •          Create a FTP Connection : OIC HomeàIntegrationàDesigneràConnectionàCreate New ConnectionàSelect Adapter FTP and select create -

Name

DHIRESH_LOCAL_FTP

Role

Trigger and Invoke

Description

POC purpose

Once Connection is created. Provide the below details –

FTP Server Host Address

Local IPv4 address identified from Ipconfig

FTP Server Port

21

SFTP Connection

No

Security Policy

FTP Server Access Policy

User Name

Windows Login Id (usually Hotmail id)

Password

Windows password

Agent Group

DhireshWinLocalAgentGroup (as created in step1)

            Save and test the connection.

  •         Create a new Scheduled Integration—OIC HomeàIntegrationàDesigneràIntegrationàCreate àScheduled Orchestration. I gave the integration name as DHIRESH_LOCAL_FTP
                 Edit the schedule parameters and add below parameter name and ensure these two directories are present in local ftp

fileName

test.txt

inputDirectory

/ftpLocalOIC/readDirectory

outputDirectory

/ftpLocalOIC/moveDirectory

 

 

            Drag the FTP adapter created above over + sign
            Details for Configuring the FTP Adapter

What do you want to call the endpoint

Move File

Select Operation

Move a File

Directory Path

/ftpLocalOIC/readDirectory

File Name

test.txt

Target Directory Path

/ftpLocalOIC/moveDirectory

Target File Name

newtest.txt

       

            Save and then ad the 3 variables. Save the integration. Add filename for tracking. Finally Activate the integration

             Activate the integration. Before Submitting the integration -

      

           Submit the integration. 

       

       

        

           You can  see after submitting the scheduled integration the file has moved from one Windows directory to another locally om your machine. 


 


Sunday, March 1, 2020

Retry using OIC

How to add retry logic in OIC


In a regular JCA adapter, there are properties for setting the number of retries.  

OIC as of now doesn’t allow retry options for Synchronous service but it does allow retry options in Asynchronous service.

In Asynchronous service the errors can be resubmitted. As per OIC documentation
Resubmitting the failed instances can be done as 
§  Single failed message resubmissions
§  Bulk failed message resubmissions


Retry can be done at integration level as well. I am providing the steps below which can be applied to the integration. This example is for SOAP Trigger. Ensure that Trigger has optional element as a RetryCounter-

Step 1: Create Integration. Create a Stage and drag an Invoke (example an external SOAP service). 
Step 2: Create an Invoke Connection with URL and Security details from integration created in Step1.  
Step 3: Set the retry counter value in OIC LookUp
Step 4: In Stage Error Handler create a SwitchCase, drag the above connection and map parameters from the main flow. 
Step 5: In the switch condition, the retry counter value should be less than the LookUp value created in Step3. 
Step 6: In Case 1 – Update the retry counter, In Case2 – Invoke the connection created in Step2. 

Thursday, February 27, 2020

Using LookUps in OIC

Here is an demo for using a LookUp in OIC



Browse OIC IntegrationDesignerLookUpsCreate

Step1: You can select respective adapters. I have chosen as per the adapters that I am using for this integration.








Step2: Once Lookup is created. Go the Integration Mapper, then drag the lookupvalue function to the input literal (blank space)









Follow the instructions. Provide default text and map the source. Once done - The integration is good to be activated. 

Note – A csv file can also be used for importing values.

Tuesday, February 25, 2020

Types of OIC integrations


OIC supports the below mentioned types of Integrations. I have copied details from OIC in the table below.

App Driven Orchestration
Multi-step Integration flow invoking applications, integrations and processes triggered by an Application or API.
Scheduled Orchestration
Multi-step Integration flow invoking applications, integrations and processes triggered by a Schedule. Commonly used for Batch/Bulk Integrations or File processing.
File Transfer
Seamlessly and securely move files across the network.
Basic Routing
Basic App to App Routing with Data Mapping.
Publish To OIC
Publish messages from Apps to OIC Pub/Sub Channel.
Subscribe To OIC
Subscribe to messages from OIC Pub/Sub Channel.

More details can be found here This documentation is very easy to follow for understanding the Integration types. 



Sunday, February 23, 2020

Create REST Integration using Oracle Integration Cloud

Using OIC this post explains easiest way to create a REST API using OIC integration



Step 1: Create an outbound Rest Connection using adapter as REST and type as INVOKE. Keep Connection Type-REST API Base URL
Provide- REST URL and Security Policy as needed to create Outbound


Step 2: Create Generic Inbound Rest Connection using adapter as REST and type as TRIGGER. The creds needed to invoke will be basic and will be same as the creds needed to login to OIC.

Step 3: Create a Basic Routing integration (Basic App to App with Data Routing). Drag the REST connection created in Step 2 



















Provide a Name and DataType in Specify Query Parameters.

Configure the Response Payload
















Click enter sample JSON which corresponds to the Invoke Connection created in Step 1
{
  "id": "Value"
}

Step 4: Drag the REST connection created in Step 1 into Drag and Drop an Invoke and perform the same steps as done in Step 3

Step 5: Do the mapping for Execute and Execute Response. Do validations and the mappings should now look green. 

Step 6: Add tracking. 








Step 7: Activate the integration
Step 8: Get the URL details and set up the SOAP UI with the URL. Give the UserId and Password used to login the OIC. Provide the Domain from the URL.
Step 9: Add the string, since it’s a GET and provide value. Run the request and the response received will be response. 

Friday, February 7, 2020

OIC Antipatterns or Best Practices

Oracle anti-pattern recommendations in one post-



1     Integration which talked too much 
Avoid fine grain invokes inside loop. This impacts downstream applications and can alter cloud pricing. 
Instead use Application or Adapter capabilities to send batch requests for processing either as request or opaque attachments. 
2     Scheduled Job which never gave up
Avoid scheduled job to process all the files in one schedule. Long running job starves other jobs which results in getting killed by the framework.
Instead limit the files to be run. Secondly call the same integration after limit is reached remembering the last processed file.
3     Look, I hacked my Integration!
Avoid externally updating the IAR file while updating complex constructs in XSLT. Integration metadata might get corrupted leading to activation failures.
Instead just alter the XSLT using import XSLT option.
4     Synchronous flow which tried to do too much
Request triggers a complex processing involving enrichment and updates across multiple system. Susceptible to timeouts, marginal slow down, half done processes.
Use asynchronous services, coarse grain callouts, avoid multiple chatty calls.
5     Too Many keys for the same door!
Multiple developers duplicate same connections. This leads difficulty in managing connections when there is an endpoint update needed resulting in bad operational maintenance. There should be a reviewer validating the connections being unique.
6     Read more than what I could chew
Read a file with large number of records and process individual records. Reading large file in memory consumes resources for other running integrations.
Instead download file and read in segments.
7     I Skipped the Spring Cleaning ...
Integrations created during development continue remain activated without being decommissioned. Bad to manage and maintain.
Always deactivate or delete the unused integrations. Its always always present in the GIT or any other repository.

Tuesday, February 4, 2020

OIC and Javascript


OIC and Javascript

Ø  Javascript can be used to perform additional level of validations or business validations. This post will provide some basic understanding on how to use a Javascript.
1.       First create a Javascript File, a filename with ‘.js’ extension. There can be more than one functions but during registration there should be atleast one function.
2.       Configure the metadata in the library. The function can then be used in the integration.
Ø  Datatypes supported by OIC for calling Javascript function-
1.       String, Number, Boolean and Return
Ø  What to do if the Javascript input is an Array.  
1.       Create a function using input as a string. Convert the string into array using the below –
function myArrayProcessor(myArray) {
                var status = 'FAILED';
                var data = myArray.replace(/'/g, '"');
                myArray = JSON.parse(data);
     for (i=0; i<myArray.length; i++) {}
  return status;}
Ø  From the integration pass the array as a string to the Javascript function. The input string will be parsed as an array in the Javascript function itself.
1.       If there are more than 1 Javascript files. Then create a Jar file and register in OIC.
Ø  To debug Javascript code use an instance of CXConsole() like in the sample code below.
2.       var console = new CXConsole();
console.log("# Variable: ", variable);
Ø  OIC has a javascript function thread execution duration of 1500ms. OIC automatically cancels the thread which runs beyond 1500ms.


If you have any questions : please mail to : kavi.dhiresh@hotmail.com

Tuesday, January 28, 2020

OIC Introduction


What is OIC? It’s an Oracle PAAS offering to integrate both Cloud based and On-Premise Applications.

Before going through OIC, there is a need to understand that there is additionally another product SOA CS. For advanced level Middleware Solutions SOA CS will be particularly helpful. Developers can use the JDeveloper IDE and deploy SOA composite to SOA CS cloud. This is a way of saying SOA SUITE/OSB will be available to the customers who rely heavily of traditional integration style or someone wants to create complex integrations.

Above said, OIC is needed for faster, lightweight, simplified integrations. OIC is currently providing 50 connectors. You can go through my other blog on ICS Agent to understand more on how to connect to a On Prem application.

OIC currently has 3 components –

  1. Integration Cloud Service
  2. Process Cloud Service
  3. Visual Builder Cloud Service


Integration Cloud Service is Oracle’s original PAAS. With OIC Oracle applied all its patches to ICS. The latest features comes first to OIC.

Process Cloud Service is a lightweight cloud version to rapidly design, automate, and manage business processes in the cloud bit similar to Oracle BPM.

Visual Builder Cloud Service makes it’s possible to create forms and pages for your processes and integrations. For coding Oracle JET and Groovy scripting.



Monday, January 27, 2020

Oracle ICS Agent - When do we need it and how to create


Why do we need an Oracle ICS Agent? 

Often the question arises, what is the need of using an agent when ICS has so many adapters. Cloud based adapters are mostly API based which may or may not need needs firewall or VPN settings.

The on-premises connectivity agent enables you to create integrations between on-premises applications (example On-premise database) and Oracle Integration Cloud Service (ICS)

The below STEPS  are required to create the connectivity - 

Step1: Create an Agent Group in ICS. Save the configuration.
Step2: Open the agent and download the agent to the Linux environment of On Prem.
Step3: Execute the On-Premise Agent installer and on-premise Linux machine, the result will be a lightweight WebLogic server instance that will be running on port 7001.
Step4: Verify the agent count change from O to 1.


Detailed example can found here 

FBDI Introduction

FBDI  stands for File Based Data Import. It is a pattern provided by Oracle to have the data loaded into Oracle ERP Cloud. Its usually u...