Flow Schedule Formula Type
Use Flow Schedule formulas to control when to submit the current flow and how often to submit future instances of the flow. You create scheduling formulas on the Manage Fast Formulas page when the predefined formulas don't meet your requirements.
Let’s say you create a formula that loads time card batches daily, and increases to four times a day at the end of a payroll period when workers typically submit their time cards. You can create a formula that schedules the frequency with which an extract process checks for new starter details.
Here are a few points to consider when creating or updating a scheduling formula:
-
Specify a meaningful name to assist the person selecting the formula.
-
Review the formula to ensure it doesn't contain negative numbers that might produce an error condition, such as running a process continually.
-
After updating the formula, cancel any scheduled flows that use the formula. Resubmit the flow to apply the updated definition.
The SCHEDULED_DATE (scheduled date) context is available to formula of this type.
Here’s the list of database items that are available to Flow Schedule formulas.
Database Item |
Data Type |
Description |
---|---|---|
FF_ADD_DAYS |
Date |
Function to add days to a date. |
FF_ADD_MONTHS |
Date |
Function to add months to a date. |
NEXT_SCHEDULED_DATE |
Date |
Calculated value for the date to schedule the next flow. |
SCHEDULED_DATE |
Date |
Date used to schedule the flow. |
These are the input variables available to Flow Schedule formulas.
Input Variables |
Data Type |
Required |
Description |
---|---|---|---|
SCHEDULED_DATE(DATE) |
Date |
Y |
Date on which to schedule the flow. The date is passed to the formula when it calculates the next date to schedule the flow. |
Use predefined names for return variables. These are the return values available to Flow Schedule formulas.
Return Values |
Data Type |
Required |
Description |
---|---|---|---|
NEXT_SCHEDULED_DATE |
Date |
Y |
The date calculated by the formula to schedule the next flow. |
This predefined formula schedules a flow so that it's submitted weekly from the date the flow owner initially submitted it.
/***********************************************************
FORMULA NAME: Weekly
FORMULA TYPE: Flow Schedule
DESCRIPTION: Formula to return a date time.
Returns NEXT_SCHEDULED_DATE;
Formula Results :
NEXT_SCHEDULED_DATE This is 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,7)
/* Returns */
RETURN NEXT_SCHEDULED_DATE
/* End Formula Text */
You can calculate units smaller than a day by replacing the calculation portion of the formula text using a decimal or a fraction. Let’s look at some examples of submitting a flow several times a day.
Flow Submission |
Formula Text for Calculation |
---|---|
Twice a day |
Note:
For accuracy, enter a value with at least ten decimal places. The formula text supports a maximum of 14 decimal places. |
Hourly |
|