Thursday, February 24, 2022

OIC | Package Migration | Multiple Integration Migration

Here we will see how to do package migration from one instance to another instance.

To migrate mutiple integrations in a package, the integrations must be defined inside a package name. If we forget to put package name while creating the integration then we can give the package name after the integration development also.

Check below blog how to add the package name after the development:

oic-add-package-name-for-integration

Steps in detail:

To show it, I have created here two scheduled integrations and put same Package name as test.package.



Go to Packages


Select your package test.package and click export.



Click export and it will download the whole package of integrations as .par file.



Now Login to another Instance and  go to Packages to import.


Click Import.


Choose the .par file.


Click Import and configure.


In my case, there is no connections or library etc. If in real scenario, there is any connections etc that we need to configure here and then click back button "<" to come out of the window.


Now activate the integrations.


Package Migration done.


OIC | Migration of integration from one environment to another | Single integration Migration | Multiple Integration Migration

We can migrate Integrations from one OIC instance to another in following two ways:

  1. Single Integration Migration: Export the integration from current instance and import it to new OIC instance.
  2. Multiple Integration Migration: Using Package, we can group related multiple integrations and migrate them in a single go.

Steps in details:

Single Integration Migration:

Login to OIC Instance >> Left Navigation pane >> Home >> Integrations >> Integrations

Select your integration which to be migrated. Click on Menu >> Export


Prompt showing downloading the integration.


Downloaded .iar file


Login to another instance and select import


Choose the imported .iar file.


Click on Import and Configure.


Now the integration imported. Here we can configure the integration connection, lookups, libraries, certificates etc. A d then click on "<" to come out of the window.


Activate the Integration.


Migration of Single integration completed.

Multiple Integration or Package Migration:

Count Number of files in AWS s3 bucket location using EC2 command

Command: 

aws s3 ls s3://bucket_name/directory_path/ -- recursive | wc - l

Move files From one AWS S3 bucket location to another location using AWS EC2 command

 aws s3 mv s3://bucket_name/from-director_path/ s3://bucket_name/to_directory_path/ --recursive --exclude "*" --include "filename_pattern*.csv"

This command we are running at aws EC2 to move the aws s3 files from one bucket location to another location.



Monday, February 21, 2022

OIC - How to group data using for each group XSLT 2.0 element

Use case:

Here we will show you how to group data Name element . In the below, we can see Name value is duplicated that we will take distinguish name values using for each group XSLT element.

We will use for-each-group element on Input and group by Name.

Input:

{"Input":[{

"Name": "Sanddy",

"Title":"Title"

},

{

"Name": "Sanddy",

"Title":"Title"

},

{

"Name": "Sanddy2",

"Title":"Title"

}

}]} 

Output:

{"Output":[{

"Greeting": "Hi Sanddy"

},

{

"Greeting": "Hi Sanddy"

}]

}

One sample code:

<xsl:template match="Person">

<xsl:for-each-group select="Student/Info" group-by="@Country">

<Country name="{current-grouping-key()}">

</country>

</xsl:for-each-group>

</xsl:template>

POC with Screenshots:












Friday, February 18, 2022

OIC - Custom ERP import callback using BI report + FAH callback

Usecase: Here, we will see how to get custom fusion accounting hub callback from ERP.

Highlevel steps:

  • Main flow (where import and child process runs) call to callback integration
  • Archive the success file
  • Execute the execution accounting report based on child request id for support help.
  • Invoke BI report and get the callback
  • Log the callback in a location for validation.

Detailed Steps:

Step1: We have 2 integrations, 

  • Main Integration where it will import the file and complete the child process if any.
  • The main flow then call the custom callback integration with below request and response:

Request:

{

"base64FileReference" : "ref",

"sourceFileName": "name",

"archiveDirectory": "",

"importRequestId": "",

"importRequestStatus":"",

"childRequestId":"",

"childRequestStatus":"",

"logDirectory":"",

"logFileName":"",

"deleteBaseDirectory": "",

"directoryAdapter":""

}

Response:

{

"archiveComplete":"Y",

"logComplete": "Y",

"ExceptionCode":"",

"ExceptionReason":"",

"ExceptionDetails":""

}

Implementation steps:

  1. Take a Bodyscope and take a Switch block and check if importRequestStatus ="SUCCEEDED" 
    1. IF Yes, and again check childRequestStatus ="SUCCEEDED"
      1. IF Yes, 
        1. Move success file to archive folder invoking another sub integration which handles the file movement, move from source folder to archive folder and delete in the source folder. Follow my below blog how to send or move files https://soalicious.blogspot.com/2023/12/oic-create-resuable-integration-to.html
        2. IF ExceptionCode or ExceptionReason or ExceptionDetails anyone is not empty, throw new fault that importsuccessArchiveFault
        3. If childRequestId !="" then call ERP cloud adapter to submit create accounting execution report.

          Service: ErpIntegrationService

          Operation: submitESSjobRequest.

          And map the all parameters to run the accounting execution report.

          jobPakageName: "/oracle/apps/ess/financials/subledger/Accounting/shared"

          jobDefinitionName: "XLAFSNAPRPTRPT"

          paramList: childRequestID,D,N,N

        4. Submit a ESS job to create BI bursting callback or control report. Operation: submitESSJobRequest service: ErpIntegrationService

          1. jobPackageName: "oracle/apps/ess/custom/delta" 
          2. jobDefinitionName: FIN_FAH_Control_Report_ESS
          3. ParameterList: importRequestId
        5. Create a custom report file name: like ReportFileName: concat("Oracle_Control_Report_FAH_",current-date(),hours-from-dateTime(current-dateTime()),".",minutes-from-dateTime(current-dateTime()),".",seconds-from-dateTime(current-dateTime()),".log")

        6. Call a subIntegration like moveCustomReport with below parameters: where we will check ess job completion staus and then download and move the report.https://soalicious.blogspot.com/2022/08/oic-to-erp-improved-custom-callback.html

          1. Request id : result of submit ess job request
          2. Directory adapter
          3. Sourcefilename
          4. Targetdirectory
      2. Otherwise,
    2. IF importRequest Status not succceeded then
      1. Archive the file.
      2. Download ess job execution details using erpIntegraTionService and feed input as import request id and filetype= log
      3. Write zip file uaing stage (content to xsd opaque element)
      4. Unzip file.
      5. For each unzip file, if filetype =log then 
        1. move log file to ftp or desired place.OIC_FILE_HANDLER
        2. Create inc and create log using child integration OIC_Notifocation

screenshots:

for submitting create accounting execution report:








ERP BI SQL Query for custom import callback.

https://soalicious.blogspot.com/2022/04/erp-bi-sql-query-for-custom-import.html

OIC- How can OIC integration subscribe to business events raised with Oracle ERP cloud

The new offering OIC allows very easily to receive or subscribe to the business events raised from the ERP or other Oracle Fusion based cloud services and forward them to others external applications.

There several business events that we can raise from ERP. Below are some of them from the standard list:

  • Account
  • Asset
  • Contact
  • Item
  • Purchase Order
  • Opportunity
  • Service Request
  • ERP Integrarion Inbound Event
  • ERP Integration Outbound Event
  • Lead
  • Accounting Period open/close
  • Payable Invoice


Screenshots: Receive events for Purchase order event raised with the ERP.












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