soalicious
Saturday, December 21, 2024
Friday, December 20, 2024
Oracle utilities Cloud - Batch job submission Rest API details
Working ...
Usecase:
In this scenario, we will utilize the provided REST API to submit a batch job to the CCS utilities server and monitor its status. The batch job will facilitate the upload of a file from OCI object storage to the CCS server.
Submit Batch Job
Verb: Get
https://server:port/spl/rest/apis/common/batch/batchJobSubmission/{batchJobId}
This operation is used to retrieve the details related to a given batch job ID. Details related to the batch job submission record are returned. If the batch job has an associated batch run, then all the available batch run details are also returned.
Request and Response:
TBD
OIC XSLT - Dynamic XPath Mapping in Oracle Integration: Handling Nested Transactions | use of current() function
OIC XSLT - Use of fn:format-number() | Formatting Large Amount Values to Two Decimal Places in XSLT
Use Case: Formatting Large Amount Values to Two Decimal Places in XSLT.
Scenario:
We are receiving an amount field value in the following format:
Input Data: 0000567892987
Our goal is to transform this input into a properly formatted number with two decimal places:
Target Output: 5678929.87
solution code:
fn:format-number((number($ReadSourceFile/nsmp0:ReadResponse/ns25:Payments/ns25:FileTrailer/ns25:TotalStubAmount) div 100), "#.00")
Saturday, December 14, 2024
OIC - Implementing Robust Error Handling with Backup Service and Custom Fault Response
Usecase:
Enhancing the API's resilience by introducing error handling to fall back to a backup service if the primary REST API for retrieving country details fails. Additionally, global fault handling will be implemented to deliver a custom fault response for consistent error messaging.
Primary service:
https://restcountries.com/v3.1/alpha/IND
Backup service:
https://api.worldbank.org/v2/country/IND?format=json
Logic steps:
- Create 2 Rest invoke connections for primary and backup services.
- Create a application integration and configure the trigger with
- Uri: /country/{code}
- Get operation
- Provide json response
- Configure Primary service Rest api
- Take a scope and keep the primary service inboke and map inside of it.
- Add scope fault handler and do the following
- Configure backup service
- Map the input code
- Take a return action and map the details.
- Configure global fault
- Add "throw new fault" action to send custom fault to OIC Error Hospital
Detailed screenshots:
Friday, December 13, 2024
OIC - How can we adjust a date to ensure it falls on a valid working day, excluding weekends and public holidays while comparing the feeded input day with the header record date in javascript?
Usecase:
If the input day of D1 record is greater than the day of the value date of RH record, the year and month should be set at 1 month before the value date of RH record.
(Note: Input day may be any day of the month i.e. 01 to 31,
but value date can only be a working day, i.e. Monday to Saturday except public holidays)
Example 1:
If input day = 25, value date of RH record = 20020926 (Thursday)
Then the input date is derived as 20020925 (Wednesday)
Example 2:
If input day = 31, value date of RH record = 20020902 (Monday)
Then the input date is derived as 20020831 (Saturday)
Example 3:
If input day = 31, value date of RH record = 20030102 (Thursday)
Then the input date is derived as 20021231 (Tuesday)
Example 4:
If input day = 31, value date of RH record = 20030204 (Tuesday)
Then the input date is derived as 20030131 (Friday)
Example 5:
If input day = 25, value date of RH record = 20250104
Then the input date is derived as 20241226
Javascript codes used:
function deriveInputDate1(inputDay, rhValueDate, publicHolidays) {
// Convert rhValueDate to a Date object
const rhDate = new Date(rhValueDate.slice(0, 4), rhValueDate.slice(4, 6) - 1, rhValueDate.slice(6));
// If inputDay is greater than the day of rhDate, adjust the year and month
if (inputDay > rhDate.getDate()) {
rhDate.setMonth(rhDate.getMonth() - 1);
}
// Set the date to the inputDay
rhDate.setDate(inputDay);
// Ensure the date is a working day (Monday to Saturday, excluding public holidays)
// Sunday is a non-working day
while (rhDate.getDay() === 0 || isPublicHoliday(rhDate, publicHolidays)) {
rhDate.setDate(rhDate.getDate() + 1);
}
// Format the derived date as YYYYMMDD
const derivedDate = rhDate.getFullYear() +
('0' + (rhDate.getMonth() + 1)).slice(-2) +
('0' + rhDate.getDate()).slice(-2);
return derivedDate;
}
// Helper function to check if a date is a public holiday
function isPublicHoliday(date, publicHolidays) {
// Format the date as YYYY-MM-DD for comparison
const formattedDate = date.getFullYear() +
('0' + (date.getMonth() + 1)).slice(-2) +
('0' + date.getDate()).slice(-2);
return publicHolidays.includes(formattedDate);
}
Screenshot of the code:
OIC steps for integration creation:
Wednesday, December 11, 2024
OIC - Major steps to import HDL file To HCM | Upload to UCM and Run import and load data job
Usecase:
Here, we will demonstrate how we can import worker data as HDL filwle to HCM using following multple steps:
- Upload the hdl file(.zip file) to ucm
- Security group: FAFusionImportExport
- Doc account: hcm$/dataloader$/import$/
- Run importAndLoadData operation
- Query, create update or delete information >> HCMDataloader service
Detailed screenshots:
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...
-
Please find the following links for OIC hands on and relevant information: Oracle Integration Cloud Introduction | Benefits | Services offer...
-
What is Throttling: Throttling is termed as "regulate the flow". Oracle Service Bus has throttling feature and by using that f...
-
OIC interview Q & A: 1. FBDI approach with an example https://soalicious.blogspot.com/2022/02/oic-erp-supplier-bulk-import-and.html 2. O...