Scheduled Swipes rule

Class Name

com.workbrain.app.ta.quickrules.ss.ScheduledSwipesRule

Overview

The Scheduled Swipes Rule is used with the Scheduled Swipes module, a component designed to recognize expected employee swipe activities. From the HTML clock, employees who have missed recording expected swipe events in a timely manner are prompted to confirm or correct the times associated with their missed swipes.

See the Infor Workforce Management Scheduled Swipes Administration Guide.

The primary goal of the Scheduled Swipes Rule is to create individual records for each swiping event an employee is expected to record. For example, an employee scheduled to work from 0800-1700 with a meal break occurring from 1200-1300 has four “scheduled” swipe events:

  1. An ON swipe event at 0800
  2. A Meal Start swipe event at 1200
  3. A Meal End swipe event at 1300
  4. An OFF swipe event at 1700

For full details on the rule logic, see "Rule logic" in the Infor Workforce Management Scheduled Swipes User Guide.

Requiring a real clock to generate scheduled swipes

You can configure the Scheduled Swipes Rule to require at least one actual clock to be present on a day before the scheduled swipe records will be generated. In this configuration, a day with zero real clocks is considered to be a Failed-To-Report situation that prohibits an employee from confirming/correcting their full collection of missed swiping events.

Creating timesheet clocks based on scheduled swipe records

In addition to creating scheduled swipe records for confirmation/correction on the HTML Clock, the rule can also create system-generated clocks on the timesheet itself. When enabled, this allows the system to automatically pay an employee to schedule even if that employee has failed to record all of their expected swipes.

Note: Timesheet clocks are only ever generated for scheduled swipe records that have a timestamp. If the timestamp of a scheduled swipe record is null, an associated timesheet clock will not be generated.

Removing stale scheduled swipe records

For employees who are no longer required to correct missed swipe events, you can configure the rule to remove existing scheduled swipe records. In this configuration, when the rule executes, any existing scheduled records on the current day are removed.

For example, a once-eligible employee can become ineligible for scheduled swipes in these scenarios:

  • The employee no longer satisfies the condition configured in the rule. For example, an organization may require only part-time employees to use scheduled swipes. When a part-time employee becomes a full-time employee, their old scheduled swipe records are removed from the application.
  • The employee moves to a calculation group that does not use scheduled swipes. For example, an organization may require employees in the CALIFORNIA calculation group to use scheduled swipes, but not employees in the NEVADA calculation group. When an employee moves from the CALIFORNIA calculation group to the NEVADA calculation group, their old scheduled swipe records are removed from the application.

Editing clocks directly on the timesheet

If a user edits clock values directly on the timesheet through an override, the rule will no longer generate scheduled swipes. When clock edits are applied to the timesheets, the rule defers to these edits and considers them to be the true values as desired by the user who performed the edits. Any remaining system-generated clocks become “real” clocks when a user edits the timesheet directly.

Automatic unauthorization of timesheets

When these situations occur, the rule unauthorizes the day and removes all scheduled swipe records from the day:

  • If an unexpected clock type is encountered.
  • If actual swipes are chronologically ordered out of the expected relative order. For example, OFF clock followed by a Meal Start clock on a single charge date.
  • If extra swipes are encountered. For example, two ON clocks on a single charge date.

Rule location

Within the Quick Rule Editor, the Scheduled Swipes Rule should be configured at the “Rounding Clocks” execution point. If a Clock Rounding Rule is also configured within the calculation group, the rule should immediately follow that rule.

Scheduled swipes log

Because the Scheduled Swipes Rule manipulates scheduled swipe records based on the absence or presence of actual clocks, a separate log table has been created. You can use the scheduled swipes log to view the full history of scheduled swipe records for any given day/employee. Logged scheduled swipe records are found in the SS_SCHEDULED_SWIPE_LOG table.

Parameters

Parameter Description
Actual Swipe Required? This parameter controls whether the creation of scheduled swipe records depends on the presence of at least one actual swipe. Select one of these options:
  • Never: Scheduled swipes are created regardless of whether an actual clock is present.
  • Always: Scheduled swipes are not created unless at least one actual swipe is found on the day.
  • On Previous Days Only: Scheduled swipes are not created unless at least one actual swipe is found on the day and the work summary date is less than the current system date. On current and future days, scheduled swipes are created even without the presence of an actual swipe.
    Note: When this option is selected, a recalculate task should be configured to ensure the days are recalculated so that a day that was the current day can be re-evaluated as a previous day and the rule rerun accordingly.
Create Timesheet Clocks? This parameter controls whether the presence of scheduled swipe records also generates clock records on the employee's timesheet. Select one of these options:
  • Never: Timesheet clocks are never created.
  • Always: Scheduled swipes always generate timesheet clocks.
  • On Previous Days Only: Timesheet clocks are not created from scheduled swipes unless the work summary date is less than the current system date.
    Note: When this option is selected, a recalculate task should be configured to ensure the days are recalculated so that a day that was the current day can be re-evaluated as a previous day and the rule rerun accordingly.

When timesheet clocks are created based on scheduled swipes, the clocks include an SS=AUTO token to differentiate them from actual clocks.

Remove All Scheduled Swipes? This parameter controls whether to remove existing scheduled swipe records for employees who are no longer required to correct missed swipe events.

When this parameter is cleared, scheduled swipe records are created based on the other parameters configured in the rule. This is the default.

When this parameter is selected, no new scheduled swipe records are created and any existing scheduled swipe records on the current day are removed. In addition, any existing artificial timesheet clocks previously created by the rule are removed. Actual clocks are not affected.

Note: Selecting this parameter disables the other parameters in the rule.

For calculation groups that have a mixture of eligible and ineligible employees, you must configure two condition sets within the rule. For example, assume that only part-time employees are required to use scheduled swipes. In this scenario, you would configure two condition sets:

  • The first condition set applies to part-time employees who require scheduled swipes to be created and maintained. In this condition set, the parameter would be cleared.
  • The second condition set applies to all other employees who require any existing swipes to be removed. In this condition set, the parameter would be selected.

For calculation groups in which no employees are eligible, you must configure the rule with this parameter selected. For example, assume that employees in the CALIFORNIA calculation group are required to use scheduled swipes, but not employees in the NEVEDA calculation group. In this scenario, you would configure the rule in both calculation groups:

  • In the CALIFORNIA calculation group, the parameter would be cleared.
  • In the NEVEDA calculation group, the parameter would be selected. For employees of this calculation group, scheduled swipes would never be created and any existing swipes on the current day would be removed.

Example: Creating scheduled swipes regardless of actual clocks

In this rule configuration, scheduled swipes get created whether the day is in the past, present, or future, and regardless of whether any real clocks exist:

Parameter Value
Actual Swipe Required? Never
Create Timesheet Clocks? Never

For example, an employee scheduled from 08:00 to 16:00 with a meal break from 12:00-13:00 records real clocks at 08:05 (ON) and 12:15 (Meal Start).

In this case, four scheduled swipe records are initially created and then updated based on the real clocks:

  1. ON clock at 08:05 (real clock)
  2. Meal Start clock as 12:15 (real clock)
  3. Meal End clock at 13:15
    Note: The time of the scheduled swipe is updated to be the real meal start time plus the scheduled break duration.
  4. OFF clock at 16:00

Example: Requiring a real clock to generate scheduled swipes on previous days

In this rule configuration, a real clock is required to generate scheduled swipes on previous days:

Parameter Value
Actual Swipe Required? On Previous Days Only
Create Timesheet Clocks? Never

For example, an employee scheduled from 08:00 to 16:00 fails to record a real clock on yesterday's date.

In this case, when the rule re-executes today, no scheduled swipes exist on yesterday's date. When the employee records their clocks today, they are prohibited from recording their missed clocks from yesterday.

Another employee scheduled from 08:00 to 16:00 forgets to record an OFF clock on yesterday's date.

In this case, when the rule re-executes today, a scheduled swipe exists at 16:00 (OFF) on yesterday's date. When the employee records their ON clock today, they are prompted to record their missed OFF clock from yesterday.

Another employee scheduled from 08:00 to 16:00 forgets to record an ON clock on today's date.

In this case, a scheduled swipe exists at 08:00 (ON) on today's date. When the employee records their Meal Start clock, they are prompted to record their missed ON clock.

Example: Creating timesheet clocks on previous days only

In this rule configuration, timesheet clocks are only created from scheduled swipes when the timesheet date is less than the current date:

Parameter Value
Actual Swipe Required? Never
Create Timesheet Clocks? On Previous Days Only

For example, an employee scheduled from 08:00 to 16:00 with a meal break from 12:00-13:00 has real clocks at 08:05 (ON) and 13:30 (Meal End) on yesterday's date.

In this case, when the rule re-executes today, the missing clocks are generated on the timesheet. A Meal Start clock is created for 12:30 and an OFF clock is created for 16:00 on yesterday's date. The employee has four clocks on their timesheet for yesterday:

  1. ON clock at 08:05 (real clock)
  2. Meal Start clock as 12:30 (system-generated)
  3. Meal End clock at 13:30 (real clock)
  4. OFF clock at 16:00 (system-generated)
Note: The system-generated clocks are updated with the actual time when the employee confirms/corrects their missed clocks.

Another employee scheduled from 08:00 to 16:00 forgets to record an OFF clock on yesterday's date.

In this case, when the rule re-executes today, the missing clock is generated on the timesheet. An OFF clock is created for 16:00 on yesterday's date. When the employee records their ON clock today, they are prompted to confirm/correct their missed OFF clock from yesterday.

Another employee scheduled from 08:00 to 16:00 forgets to record an ON clock on today's date.

In this case, the missing ON clock is not generated on the timesheet. When the employee records their Meal Start clock, they are prompted to record their missed ON clock.

Example: Removing scheduled swipes from ineligible employees in a calculation group

In this rule configuration, scheduled swipes are only created for part-time employees in a calculation group. When a part-time employee becomes a full-time employee, their old scheduled swipe records are removed from the application.

For this scenario, two condition sets are configured within the rule:

Part-time

The first condition set applies to part-time employees who require scheduled swipes to be created and maintained. For these employees, the condition evaluates to true and the rule creates scheduled swipe records.

Is Employee Property Generic Condition:

Parameter Value
Expression String "empFullTime=N"

Rule parameters:

Parameter Value
Actual Swipe Required? On Previous Days Only
Create Timesheet Clocks? On Previous Days Only
Remove All Scheduled Swipes? Cleared

Ineligible for Swipes

The second condition set applies to all other employees who require any existing swipes to be removed. For these employees, the rule removes existing swipe records.

Rule parameters:

Parameter Value
Actual Swipe Required? (Disabled)
Create Timesheet Clocks? (Disabled)
Remove All Scheduled Swipes? Selected