Tuesday, January 29, 2019

#680 Oracle Integration --> Consuming Fusion ERP REST Services

This post of a customer question - How can I easily create an invoice in ERP?

I checked out the Fusion ERP REST API documentation here

and found the following -










The request payload example was as follows -


















I had to run a couple of reports in ERP to get valid values for -
1. Business Unit
2. Supplier
3. Supplier Site












Then I tested the REST call in Postman -

























I then logged into Fusion ERP and looked for the invoice -


















So far so good, now to OIC -
Here I create a REST connection to Fusion ERP












I then create a scheduled integration - read the invoice from an FTP server and
invoke the above.

























that's it!

Naturally, I can also access these REST services via the Fusion ERP adapter in OIC.

Friday, January 25, 2019

#679 Oracle Integration for HCM - File upload

Here is an example of doing the above -







































Now let's look at the actions here -

1. Schedule Trigger - no need to explain this.

2. ReadFile  from FTP -
here I read a file from my ftp server. This is a zip, containing the following .dat file in the following format -









The ReadFile is configured as follows -
















UploadFile to HCM is configured as follows -



















As you can see this is using the standard SOAP adapter to talk to UCM.

Now the mapping to UploadFile is interesting, to say the least.

Here is the source -

























Here is the target -





































Let's look at the 5 fields under Document -

The fields that the UCM SOAP service expects are described here -




































Full doc -click here

I set the following -
dDocTitle
dDocType
dSecurityGroup
dDocAccount
primaryFile


The 5 Target fields are created by repeating field1 4 times.
Each field has the following structure -







the values of which are set as follows -










and so on...

dDocType is set to "Document"

dSecurityGroup is set to "FAFusionImportExport" again, as shown in the screenshot from the UCM doc above.

dDocAccount is set to "hcm$/dataloader$/import$"

primaryFile is set to the ReadFtp Response file name
e.g. FileReadResponse/ns2:ICSFile/ns2:Properties/ns2:filename


What happens now that we have the file in UCM?

























We need to use the HCM adapter to import and load the data from UCM to HCM proper.


























Now to the mapping -

I set the Target ContentId to

$UploadHDLFileToUCM/
nsmpr1:GenericResponse/
nsmpr1:Service/nsmpr1:Document/nsmpr1:Field[@name='dDocName']


 and the Target Parameters to
"FileAction=Import_And_Load"











That's it!

Here is my input .zip, containing my .dat file -













I submit a run -















I check in HCM -

































#678 Integration Cloud / HCM Integration & HCM adapter in depth

I have been looking at integrating with Oracle HCM recently.
As a neophyte in respect of HCM, I first began by looking at what it actually contains -

Here are the pillars




















Here are the modules within those pillars














Global HR is the core solution.

From the docs -
A unified HR system in the cloud lets you eliminate disparate systems and align your HR processes and reporting worldwide—ensuring HR process and data consistency. To ensure efficient local operations, features such as entire system translations, data protection support, local business rules, country payrolls, and compliance reporting are crucial. Highly configurable processes are also needed to simplify quick adaptation to legislative and organizational changes—without causing disruption to your business. 


Inbound Integration support within Oracle HCM


Oracle HCM comes with a plethora of pre-built integration capabilities e.g.
HCM Data Loader 

HCM Data Loader is a powerful tool for bulk-loading and maintaining data. The data can be from any source. You can use HCM Data Loader for data migration, ongoing maintenance of HCM data, and coexistence scenarios, where core HR data is uploaded regularly. 

You can also load data into HCM via Spreadsheet Loader -

HCM Spreadsheet Data Loader is a generic data loader that you can use to load most objects that HCM Data Loader supports. The exceptions are components, such as Document Record Attachment and Person Image, that don't provide user keys. Objects are loaded from the spreadsheet to the HCM Data Loader stage tables. HCM Spreadsheet Data Loader is available in the Data Exchange work area.

Finally, Payroll Batch Loader can be used to load payroll business objects into Oracle HCM Cloud.



Outbound Integration support within Oracle HCM

So how do we get data out of Oracle HCM?

Bulk Data Extract -

The main way to retrieve data in bulk from Oracle HCM Cloud is HCM Extracts, which is a tool for generating data files and reports.
HCM Extracts has a dedicated interface for specifying the records and attributes to be extracted. You:
  • Identify records for extraction using complex selection criteria.
  • Define data elements in an HCM extract using fast formula database items and rules.
You manage HCM Extracts either in the Data Exchange work area or using the Checklists interface in the Payroll work area. Alternatively, you can run extracts using the Flow Actions Service web service from outside Oracle HCM Cloud. This feature enables you to automate the outbound extract as part of an overall integration flow.
You can also leverage BI Publisher -

Oracle BI Publisher supports both scheduled and unplanned reporting, based on either predefined Oracle Transactional Business Intelligence analysis structures or your own data models. You can generate reports in various formats. To use Oracle BI Publisher for outbound integrations, you generate reports in a format suitable for automatic downstream processing, such as XML or CSV.



Oracle HCM Atom Feeds

read all about them in this blog post.


The above are discussed in detail in the following Oracle doc








Oracle HCM REST API

The most recent (19a) REST API documentation is here

The use cases covered by the REST api are detailed here

The following screenshot just lists some of them -









































Oracle HCM SOAP API


HCM support for SOAP Services is documented here


Now to Oracle Integration and how it supports us in integrating with Oracle HCM -

Oracle Integration HCM Adapter

The adapter supports the following -
1. REST APIs
2. Bulk Data Extract
3. HCM Data Loader
4. Atom Feeds

Let's look at these in a bit more depth -

REST APIs

The REST APIs are listed here

Let's look at employees -





























I run Get all employees in Postman and find Chris -

























Chris and I go back a long way, we used to drink together down in the Horse and Hound Public House in Harmonstown.

His PersonId is -








I can, of course, use that as follows -

/hcmRestApi/resources/latest/emps?q=PersonId=100000000276211




































So now, having looked at the ways in and out of HCM, 
let's look at how the Oracle HCM adapter supports us.



Oracle Integration HCM Adapter

The HCM Connection in Oracle Integration is configured with the following -









The HCM Services Catalog WSDL URL points to -

The service catalog service is 
a Fusion Application service that returns a list
of external services available for integration. It 
allows clients to retrieve information about all
public Fusion Application service endpoints 
available for that instance.


The Interface Catalog URL enables the use of REST resources.
Now that we have the connection - let's look at it in use -










































The wizard provides a business friendly interface to the HCM integration components I have already discussed.



Query, Create, Update or Delete Information:






























Let's check out SOAP based Business Objects -





The Target mapping is as follows -


























Let's look at SOAP based Services -






























The Target mapping is the same as above.

Now to the REST Services - I am switching to Emps



























The Mapping Target is this case is -











Remember my Postman example ?

/hcmRestApi/resources/latest/emps?q=PersonId=100000000276211

I essentially do the same here.


Extract Bulk Data using HCM Extracts:






















The HCM Extract must, of course, already exist -

I have access to one called - Encrypted New Hire Export

One can navigate to the Extracts in the HCM app as follows -

Main Menu - Data Exchange --



























































One can also check out the fields extracted etc.
























The resulting file of the extract is placed into the UCM (Universal Content Management) component of Oracle HCM.

This is from where Oracle Integration picks it up.
Ergo, the extract will have to have run at least once for us to pick it up.


So back to the HCM adapter -














The Mapping Target is as follows -
















The highlighted field has to be set. This is used to identify the last HCM extract processed.

Now to a simple integration that demos leveraging the HCM Extract in Oracle Integration.

I create a new scheduled integration -




















I add the HCM adapter -


































I now define a schedule parameter which will be used mapping.














I initialise as follows -







Now to the Mapping -








In this simple example, I will send an email to myself,
containing the Extract document id etc.


















Here is the result -








The next area I will discuss is HCM adapter support for Atom feeds -

This section is short and sweet as I have already documented this in the blog post here
















Finally - File Upload -

This is discussed in the following blog post.