Usecase: Here , we will see how to schedule and download HCM Extract and send to downstream applications using Oracle HCM cloud adpater.
High level:
We will create 3 integrations and achieve our goal as follow:
- One scheduler integration: This will only be used to schedule and call 2nd common extract integration and pass Effective Date name value pairs.
- Common HCM extract integration: This oneway appdriven integration will do the following
- FlowActionService >> SubmitFlow : will extract the data to ucm
- getFlowTaskInstanceStaus : it will show extract status
- If extract SUCCEEDED, get IntegrationContentId
- Call main integration and pass the content id.
- Main Integration:
- GET_FILE from ucm using dDocName as content id and using GenericSoapPort wsdl service
- Decode the file
- Transformed the file to downstream specific format.
- Call downstream app and send the file
Integration names used:
- INT<Interfaceno>_<Source>To<Target>_interfacedetails_Sch_V1
- Common_HCM_Extract_Trigger_V1
- INT<Interfaceno>_<Source>To<Target>_interfacedetails_Main_v1
Detailed steps:
1st Schedule integration:
Step1: Schedule param:
- LastRunDate : ""
- Schedule_EffectiveDate : "YYYY-MM-DD"
Step2: Assign required variables:
- varInterfaceName: INT332
- var_ExtractDelayinSeconds: 60
- var_ParameterName : 'Effective Date'
- var_ParameterValue: ns94:format-dateTime(fn:curent-dateTime(),'[Y001]-[M01]-[D01]')
Step3: Switch and check
If $schedule_effectivedate = ns74:format-dateTime($schedule_effectivedate,'[Y001]-[M01]-[D01]') or
$schedule_effectivedate = 'YYYY-MM-DD'
Step4: INVOKE OIC common extract integration.
and map below details:
- Interfacename
- Processname
- Correlationid as instanceid
- Extractdelayinseconds
- Lastrundate
- Extract params(effective date name and value)
Otherwise: Throw new fault:
Invalid date format input for effective date.
Step5: From Default fault handler, rethrow fault and from Global fault >> send the fault details to Data dog app or notification as per requirement.
Common HCM extract integration:
Step1: Rest Post trigger
Payload:
{
"interfaceName":"",
"processName":"",
"correlationId":"",
"extractDelayInSeconds":"",
"sequenceNumber":"",
"lastRunDate":"",
"extractParameters":{
"parameter":[{"name":"","value":""}]},
"extractIntegrationName":[{"integrationName":""}]}
Step2: SubmitFlow:
Select created oracle hcm cloud adapter >> select Query. Creat, update or delete information >> select Service: FlowActionsService >> Operation: submitFlow
Map the following details:
- Flowname
- Pass the parameters (Effective Date and value)
- FlowInstanceName: fn:concat($var_IntegrationName,fn:current-dateTime())
- LagislativeDateGroup
- RecurringFlag: false
Step4: Take a while loop and chek the getFlowTaskInstanceStatus till extract completed true.
var_ExtractCompleted= 'false'
Select created oracle hcm cloud adapter >> select Query, Creat, update or delete information >> select Service: FlowActionsService >> Operation: getFlowTaskInstanceStatus
And map the following:
- flowInstnaceName
- flowTaskInstanceName : flowname
- legislativeDataGroupName
Step5: take a switch and check getFlowTaskInstanceStatus >> result >> 'COMPLETED' Then
Assign as below:
var_ExtractCompleted : true
Otherwise: nothing.
Step6: for each extract, repeating element: extractIntegrationName. Check content id.
Select created oracle hcm cloud adapter >> select Query, Creat, update or delete information >> select Service: FlowActionsService >> operation: getIntegrationContentId
Pass the following:
- flowainstanceName
- flowTaskInstanceName : Flow name
- legislativeDataGroupName
- IntegrationName
Step7: take a stage and write the content id and process id
Step8: take a assign and store contentid response status.
Step9: take a switch and check if contentid status = 'SUCCEEDED'
THEN
Take a logger and log always
Concat('Status of this content id:'ContentId,'is ', Status)
Otherwise throw new error.
Step10: read the contentid and process id using stage.
Step 11: call the next main integration and pass below fields:
- interfaceName
- processName
- correlationId
- SequenceNumber
- Ucmcontent details:
- content id
- processs id
- lastRundate
- Connectivity properties:
- Localintegration
- Code : fetched from lookup
- Version: fetched from lookup
Main Integration:
Step1: rest trigger
Payload:
{
"interfaceName":"",
"processName":"",
"correlationId":"",
"sequenceNumber":"",
"UCMContentDetails":[{"ContentId":"","ProcessId":""}],
"flowInstanceName":"",
"lastRunDate":""
}
Step2: Download file from ucm:
Step3: read the in segments and Write the file using stage and send to downstream apps
No comments:
Post a Comment