Monday, November 4, 2024

#1032 - OIC Integration Basics - Lab 4 Scheduled Integrations

Introduction

A scheduled integration, as the name suggests, runs according to a schedule that you define. Many HCM and ERP integration scenarios are file based and also time based. For example, a directory synchronization scenario between your IDM directory and Fusion HCM. OIC could use HCM Atom Feeds to extract new employees, transform the employee data and invoke the IDM service. From a business perspective, this job need to run at 5pm every working day.

I'm not going to implement the above, but let's start with a very simple example - 

Lab: Scheduled Integrations


Save and Activate - 

Note here the ability to decide under which user account the scheduled job will run. It defaults to my developer user, but you could imagine one creating a dedicated technical user account for such. Also note the ability to execute ad hoc, which we will do soon, or else according to a schedule.

I click Run

Note that there is no Endpoint Metadata button shown, as this will not be called by a 3rd party client directly.

Now let's add a schedule - 

Note the 2 option above, we'll stay with Simple - and set the job to run every 4 hours - 

I click Save - now to activating the schedule -  

Per default, the schedule is stopped - 
So I click on Start

Per default, I see the next 24 hour view - 6 jobs planned - 

Back in the main Project page - click on Observability

Click on Future Runs

This is very useful, as it gives an aggregated view of the schedule for all scheduled jobs within the project.

It is a best practice, NOT to have all these jobs starting at the same time, that's if business permits.


There is a way to execute a scheduled integration apart from via the UI (ad hoc) and according to the schedule. Here one can use the OIC Factory REST api - 

I will discuss the OIC REST APIs in detail in a later post.

Scheduled Parameters

Scheduled integrations can have parameters, the values of which are persisted between runs. For example, I have a scheduled integration that gets all new hires from Fusion HCM, since the date last run.

Let's create such - please note, you need to stop the schedule, before you can deactivate the integration. 

I add an Assign action, after the Logger - here I will assign the current dateTime to the scheduled parameter.

Note, I am using 2 built-in OIC functions here - 

I've already run the integration - 
the parameter is set to a couple of minutes ago.

I run it again - 

I will see the new date, if I again click Run. 


Summa Summarum

In this lab we have covered the basics of scheduled jobs and seen how useful scheduled parameters are in the processing of such. 

The next lab look at OIC Connections in detail.








 





 

 




















No comments:

Post a Comment