Cascade Time Code Rule

Class Name

com.workbrain.app.ta.quickrules.CascadeTimeCodeRule

Note: The Cascade Time Code Rule is not in the Quick Rule Template. To add the rule to the template or to an existing calculation group, see Assigning rules to calculation groups.

Overview

The Cascade Time Code Rule is used when time codes that affect balances must be cascaded to another balance when they go below minimum or above maximum values.

This rule must never be called after the point of Authorization in the Quick Rule Editor since the balances are affected at this point. The purpose of this rule is to change the violating time code to a non-violating time code.

The Cascade Time Code Rule supports the definition of multiple time codes that can cascade to a single balance.

Note: 
  • If you want multiple time codes to affect a single balance, all of the time codes must be included within a single configuration of the rule or a single condition set.
  • The order in which you want the time codes to affect the balance must be the order in which the time codes are specified within the rule configuration.

To define multiple cascade instructions within a single condition set, use the plus sign (+) to generate a new configuration row.

Parameters

Parameter Description
Cascade From Time Code Time code to check for the violation of balance minimum/maximum values.

The Cascade From Time Code parameter must be configured to "Affect Balances"; otherwise, the rule will have no effect. The Cascade From Time Code parameter must be configured to affect "Cascade For Balance; otherwise, the rule will have no effect.

Cascade To Time Code Time code to use when converting the violating amount.
Cascade For Balance Balance on which the violation check will be performed on.
Cascade When One of two possible values: BELOW MINIMUM or ABOVE MAXIMUM. Determines which type of violation must be checked.

Example: Single cascade instruction

Assumptions:

  • SICK Balance As Of Date: 5 hours
  • SICK override is entered from 08:00 - 17:00
  • Requirement: Convert any SCK code below 0 to SCK-U

Work details before:

Start End Time Code
8:00 17:00 SCK

Parameters that are used in this example are:

  • Cascade From Time Code = SCK
  • Cascade To Time Code = SCK-U
  • Cascade For Balance = SICK
  • CascadeType = BELOW MINIMUM

Work details after:

Start End Time Code
8:00 13:00 SCK
13:00 17:00 SCK-U

Since 9 hours of SCK would reduce the SICK balance to -4, those 4 hours are converted to SCK-U.

Example: Multiple cascade instructions

In this example, an employee with 1.5 hours of PTO remaining records two hours of PTO-affecting time.

Configuration:

From To For Balance When
VAC VAC-U PTO BELOW MINIMUM
SICK SICK-U PTO BELOW MINIMUM

Before:

Start End Duration Time Code Hour Type
0800 0900 60 VAC REG
0900 1000 60 SICK REG

After:

Start End Duration Time Code Hour Type
0800 0900 60 VAC REG
0900 0930 30 SICK REG
0930 1000 30 SICK-U UNPAID