Introduction
I hope that most of you by this time must have been familiar with HCM Extracts if not you may feel free to read some of the articles like
One Extract for All HCM Outbound Integrations
User Defined Parameter as HCM Extract Filter Criteria
Using Extract Rule Type Attribute for HCM Extract
Using Record Calculation Extract Attribute for HCM Extract
and
Notifying Changes Using HCM Extract
In this article we would like to demonstrate how to schedule a Custom HCM Extract. For this example, we would create a very simple HCM Extract (PersonName) which will have Person Number, Person First Name, Person Last Name, Person Full Name, Person Display Name, Person Name Start Date and Person Name End Date as extract attributes.
We would then try to schedule this extract to run every 5 minutes ( yes not a real life scenario but just to demonstrate how scheduling works). The delivered scheduling option available for an HCM Extract is Once, Daily, Weekly, Monthly and PAY_SAMPLE_FLOW_SCHEDULE (delivered Fast Formula which gives the next scheduled date).
Since we do not have any delivered schedule option which submits extract after an interval of 5 mins we would have to create a Custom Fast Formula of Flow Schedule Type.
Pre-requisite
We would need to have two things in place before we can schedule a HCM Extract. They are:
Custom HCM Extract which is to be scheduled
Custom Fast Formula which would schedule the Extract after every 5 minutes.
We would navigate to Data Exchange-> Manage Extract Definitions -> Search for (PersonName Extract)
Creating a Custom Fast Formula (Flow Schedule)
As we have already seen that there does not exist a delivered Fast Formula which can be used to schedule the extract we would need to create one.
Fast Formula Text |
/***************************************************************************** FORMULA NAME: FiveMinFlowSchedule FORMULA TYPE: Flow Schedule DESCRIPTION: Formula to return a date time. Returns NEXT_SCHEDULED_DATE; Formula Results: NEXT_SCHEDULED_DATE This will be a date time value with yyyy-MM-dd HH:mm:ss format. *******************************************************************************/ /* Inputs */ INPUTS ARE SUBMISSION_DATE(DATE), SCHEDULED_DATE(DATE) /* Calculations */ NEXT_SCHEDULED_DATE = ADD_DAYS(SCHEDULED_DATE,0.0035)
/* Returns */ RETURN NEXT_SCHEDULED_DATE /* End Formula Text */ |
When created the Fast Formula would appear in UI as below:
Now that we have the Extract and Flow Schedule Fast Formula in place we will go ahead and schedule the extract and verify the results.
Scheduling Extract
In order to schedule the extract we need to choose the “Submit Extract” options and choose the “Using a schedule” option under flow submission. Here we have chosen the newly defined fast formula FiveMinFlowSchedule and given a start and end time too
Verifying Results
As a last step, we should choose the “View Extract Results” and we should be able to see all the extracts for this flow there
Notice that the Recurring Flag is set to “Yes” which means this flow gets resubmitted but if we calculate the start time and end time there is a gap of 25 minutes which means there should be 5 submissions each with an interval of 5 minutes. That’s exactly what you will observe if you pay attention to the Submitted On and Completed On fields in the snapshot above.
And with this I have come to the end of article. Hope this was a new learning and would be useful in your real time projects.
That’s all for now have a nice day!