Tuesday, August 24, 2021

OIC - Decrypt file using FTP download operation and read reference in stage activity

Use Case: Here, we will download (with decrypt) an encrypyed csv file without schema option  and then read file reference using stage read entire file option.

Implementation steps:

Step1: First create FTP connection following below blog:

https://soalicious.blogspot.com/2021/08/oic-create-sftp-connection-with-pgp.html

Step2: Create an orchestrated intwgration and drag and drop FTP connection and download the file with pgp encrypt option.


Step3: add the stage activity and choose the read the entire file option and provide the file reference from download response object.


Step4: provide the csv sample file for reading the reference.


Now the integration flow will like as below:

Save and test.

Encrypted csv file:



From Monitoring - view activity stream:



OIC - Encrypt and Decrypt using FTP adapter and PGP

Use Case: Here, we will first read a csv file and then encrypt the file (with Write) and then read the encrypted file and decrypt the file(with Write).

Implementation steps:

Step1: Create a FTP connection using PGP keys. Follow below blog:

https://soalicious.blogspot.com/2021/08/oic-create-sftp-connection-with-pgp.html

Step2: Create a scheduled orchestrated integration and drag and drop FTP connection and configure with read operation with input directory and filename details and provide a CSV file as schema reference.


Step3: drag and drop FTP connection and Write with output directory and filename and select PGP encryption option.


Step4: map the read file details to write fields.


Step5: drag and drop FTP server and read the encrypted file with inpit directory and file name details.


Step6: map the write file fields to read encrypted file fields.


Step7: Drag and drop FTP with Write operation and select Perform PGP Decryption option as below.


Step8: map the file fields


Step9: add tracking and now the integration will like as below. Save it and test.


Input CSV file:


Encrypted file:


Decrypted file:



OIC - Create SFTP connection with PGP private and public keys

Here I will show you what details you need to create a SFTP connection using PGP keys to use in encrypting and deceypting files in integration flow elements.

Step1: First create PGP keys following below blogs:

https://soalicious.blogspot.com/2020/10/oic-create-pgp-key-to-use-in-ftp.html


Step2:  Go the connection page and creatw new connection as FTP and provide the following connection properties.

FTP server host address
FTP server port
SFTP connection: yes
Step3: Add security policy as FTP Server Access policy.


Step4: Add User name, Password and public pgp key.

Step5: Add ASCII armor Encryption format as Yes , cipher algorithm as AES256, and upload PGP private key and private key password.


Step6: Save and test.

Tuesday, August 17, 2021

OIC - How to migrate integrations using OIC Rest APIs

Export an Integration:

/ic/api/integration/v1/integrations/{id}/archive

Verb: Get

Import(Add) an Integration:

/ic/api/integration/v1/integrations/archive

Verb: Post

It imports a new integration that was previously exported. To submit an import request, the integrations must not be present in the environment.

Import (Replace) an integration:

/ic/api/integration/v1/integrarions/archive

Verb: Put

Updates an existing integration with the same name that was exported previously.

Note: importing an integration with a different user name or version that what was exported is not supported 

Implmentation steps:

TBD


Monday, August 16, 2021

OIC - How to include an existing integration to a package

Suppose you have missed to include your integration in a package during integration creation. So dont worry, there is a easy way to include your created integration in a package. 

Follow the below steps:

Step1: Click on the integration(it should be deactivated state)


Step2: click on Actions and primary info


Step3: select your package



Step4 : Save it.

OIC - How to Migrate Integrations in OIC

Use case: How to migrate integrations in OIC.

Integrations can be migrated to higher instance in 2 following ways:
  • One Integration at a time: Use .iar file to migrate 1 integration at a time to next instance.
  • Bulk or package Migration: Use package (.par) file to migrate integrations in bulk to higher instance.

Whats is migrated as part of migration:
All connections
Libraries
Lookups

What is not migrated as part of migration:
Connection credentials
Connectivity agent
Analytics
Logs


More details:

One Integration at a time:

Step1: Go to the OIC instance(suppose Dev) and click on the actions of the integration to be exported and click export.


Step2:  the file will be downlaoded as .iar file and this jar will contain the integration and all the underlying components with it like connetion name etc.

Step3 : Now login to higher instance like UAT or SIT
And click the impory button

Step4: choose the .iar file.

Step5: once file is selected, either you can import or import and configure.

Step6: once import done, you will observer that connections are in draft and integration is in configure state. You have to go to the connections and edit your connection as per the instance and activate the integrations.


Bulk or Packge Integrations:

Step1: Whenever you are creating a new integration, keep the integration in package placeholder like ERP related integrations are in samw package etc. By provide a new package name or use existing package.

Step2: Go to package and export one package which you desire to export. It will import .par file.







Step3: Import the exported package.




Step4:
As we have selected import and configure option, you can see all the imported components and integrations like integrations, libraries, certificates, connections etc. Now just check all connctions and edit them as per your new or higher instance.


When to use "import and config" option over import:
Suppose there is already a connection in the higher instance, then during package migration, you can replace your imported connection with the exisitng instance connection.





Friday, August 13, 2021

OIC - Change date time format using xp20:format-dateTime() function

Here, we will play with the xp20:format-dateTime() function and generate different date and time formats.

About  xp20:format-dateTime():

This function takes two arguments

  • dateTime : like 2021-08-13T07:35.29.849+00:00
  • Format: the format which we want.

Meaning of all the format codes:



Lets play with the different date and time formats:

Example1: change the dateTime to dd-MM-yyyy format.

xp20:format-dateTime(startTime,"[D01]-[M01]-[Y001]")

Output: 13-08-2021

Example2: change tthe dateTime to dd-MM-yyyy HH:mm:ss

xp20:format-dateTime(startTime,"[D01]-[M01]-[Y001] [H01]:[m01]:[s01]

Output: 13-08-2021 08:55:22

Example 3 : change the dateTime to yyyy-MM-dd h:mm AM/PM

xp20:format-dateTime(startTime,"[Y001]-[M01]-[D01] [h1]:[m01] [P]

Output: 2021-08-13 8:55 am

Example4: change the datTime to HH:mm Timezone

xp20:format-dateTime(startTime,"[H01]:[m01] [z]

Output: 08:55 GMT+00:00

Example5: change the dateTime to ordinal value of day-monthname-day of the week

xp20:format-dateTime(startTime,"[Dwo]-[MNn]-[FNn]

Output:thirteenth-August-Friday


Used Formats in OIC:


Received output from monitoring:






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...