Thursday, January 24, 2019

#677 Consume HCM Atom Feeds in Oracle Integration














Dedicated to those of you interested in integrating with Oracle HCM -


So what are Atom Feeds?

HCM Atom feeds generate notifications on HCM events. 
For example, a new employee is hired - this causes a corresponding Atom Feed to be sent to the Atom server. The feed contains metadata and a pointer to the REST resource which can be used for retrieving the employee. Oracle Integration can subscribe to these Atom feeds.

So which HCM events are supported?

According to the docs -

Oracle HCM Cloud currently supports creation of Atom feeds for the emps and workstructures resources in the following scenarios:

When an employee is hired, updated, or terminated
When an assignment is created, updated, or end dated

When any of the following workstructures is created, updated, or end dated:
Grades
Jobs
Locations
Organizations
Positions

So now to a simple example -

Here is my HCM connection definition in Oracle Integration, yes we are dropping the C.
















Here is the first part of the integration -





































This is a scheduled integration that gets new hire information from the HCM Atom Server.

The HCM adapter invoke is configured as follows -












































Note the checkbox at the bottom -

Select this checkbox to send an HTTP request
for each entry in the feed to the ATOM server
to fetch the business object snapshot.

Ok so now we have the atom feeds - next steps are

















for each new hire ...








get the employee details and write them to a file via ftp server invoke.

Let's look at getEmployeeDetails -

Here we just use the REST adapter to call the following -
























The Atom Feed contains the emp unique id, so we can call the resource
Get an Employee - /emps/{empsUniqID}

As you see, we do this in within a For Each Loop.















Now to the mapping from the atom feed to the REST query parameter -




















I map the PersonId to the parameter.

BTW. The lab is courtesy of my HCM colleague Peter S.
Thanks Peter!

Now back to that checkbox I mentioned -







What happens when I check this, in other words, what does
the atom feed response look like?





















Note the Emps above EmployeeNewHireFeedWithBO_Context -





















No comments: