Wednesday, May 27, 2020

#768 OIC --> HCM Data Extract Processing Pattern

Simple scenario here -

I need to pick up an HCM extract from UCM and process it in OIC.

There are 2 variations here -

1. simple pass thru processing - pick up the file and send as is to a target, in my case an sFTP server.

2. there is a need to transform the data from HCM, before sending downstream.

Simple Pass thru Processing 

Here is the delivery option definition for my extract -

Note the integration name above - this will be used in the OIC HCM invoke configuration.

The integration using the Scheduled orchestration pattern. 
I have added a schedule parameter - docID. 
For the first run, this will be set to 0. 
The final action in the integration flow is an ASSIGN to update this docID value to that of the document read.

 Here is the configuration of the HCM adapter in my integration -

Note the same Integration Name above.

Now to the Mapping - here we leverage the schedule parameter -

I now add an Invoke - write file to FTP

I map as follows -

Essentially, pass by reference - no need to process the file contents in OIC.

Read and Transform 

Here I need to read the contents of the HCM extract and transform them into the format required by the target system.

For this I require 2 xsds -
1 - describing the contents of the HCM Data Extract - this can be downloaded from HCM.
2 - describing the format required by the target. 

To get the Data Extract xsd - 
In HCM - My Client Groups - Data Exchange - HCM Extracts - Extract Definitions -

Click the pencil icon to edit the definition, then scroll down to the Extract Execution Tree

Click on the link above -

Very simple, once you know where to look!

Ok, I have my 2 xsds - now to reading the file.

So where is the file? Think of it as being in the OIC VFS - Virtual File System.
We need to read it from there, using the STAGE FILE action.

Also one needs to consider the possible file size. If it cold be 10MB+, then
we will choose the STAGE FILE option - Read in Segments

Note, I have set the File Name and Directory to variables returned by the getExtractFile operation.

I then specify the format - pointing to the XSD I downloaded from HCM

I then add an FTP Invoke - this is my target system, in this short exercise.

The FTP WriteOutputFile is configured as follows -

I also added an ASSIGN action to update the schedule parameter docId.

I do the required mappings, activate and run.

Note the Iteration above for the Read File in Segments action.

No comments: