Assembling Rules

To assemble rules, use the Rules (TL_RULES) component.

Once you have defined the individual building blocks that make up a rule using actions and conditions or SQL objects, you need to combine these components into complete rules and place them in a logical order by arranging them into rule steps using the pages described in this section.

You'll also use these pages to modify existing rules or copies of rules. For example, you can take an existing rule (whether template built or of another type), open it within the Define Rules component, modify or add new actions or conditions to it, and then recompile the rule.

Rule Assembly Tasks

Assembling rules comprises of entering basic information about a rule, defining the steps of the rule, creating descriptions for each rule step, viewing the SQL text of the rule step you are adding to a rule, and copying rules.

Page Name

Definition Name

Usage

Rules Page

TL_RULE_PNL1

Enter basic information about a rule and enter descriptions for each rule step.

Action SQL Text Resolution Page

TL_RULE_TEXT_SP

View the SQL text of the rule step you are adding to a rule.

Use the Rules page (TL_RULE_PNL1) to enter basic information about a rule and enter descriptions for each rule step.

Navigation:

Set Up HCM > System Administration > Utilities > Build Time and Labor Rules > Rules > Rules

This example illustrates the fields and controls on the Rules page. You can find definitions for the fields and controls later on this page.

Rules page

Field or Control

Description

Save As...

Select to duplicate a rule by giving it a different name, or create a rule that is similar to an existing rule or a PeopleSoft-delivered rule object.

This function replaces the Copy Rules page from previous releases of PeopleSoft Time and Labor.

Important! When you use the Save As... button to create the copy, the system saves the source object with any modifications prior to selecting the Save As ... button. You should always create the copy first, and then make changes to the object.

Compiled

The system populates this field automatically to signify whether the rule was compiled. When this field is selected, the rule was compiled and hasn't changed since that compilation.

Time Period ID

Select the time period of interest that applies to this rule. Values include the values delivered by the PeopleSoft system and any time periods that you created using the Time Period pages. The system uses the time period to determine the date range for the selection criteria of the rule. The Time Administration program also uses the time period to determine which reported time to load into the working tables during processing.

Run Location

You can update this field only if you activate the Run Online Rules option on the TL Installation page. Valid values are:

Batch Only: Select for the system to apply this rule when you run the Time Administration batch process.

Online and Batch: Select for the system to apply this rule when you run the Time Administration batch process or the Apply Online Rules process that you start from the elapsed timesheet or the punch timesheet.

User Exit

Select if the components of the rule are written in PeopleSoft Application Engine or in PeopleCode. If you select this option, the Compiled and Last Compiled fields are unavailable and the Define Rule Steps page is unavailable. The system locates the created section in the TL_TA_RULES library.

Create a user exit by creating a new AE section within the TL_TA_RULES library. Add the AE section name to the AE section list on the AE Section page.

AE Section (application engine section)

Select the AE section to use to process this rule. This section is inserted into TL_TA_RULES library when you compile the rule.

Note: Do not modify Time and Labor objects in the AE library. Use the Time and Labor pages.

Core Component

This field is display-only and is system-maintained. Many rules are delivered with Time and Labor. These rules are used in rule templates. If the rule you are viewing was created by the PeopleSoft system, then this field is set to Y. If you created this object, the system sets this field to N. When you add a new rule, the system sets the Core Component field to N.

Last Compiled

The system-maintained field that displays the last date and time that this rule was compiled.

Explanation

Enter a detailed description of the rule. You can include examples of how this rule is used and how it affects data in different scenarios.

Define Rule Steps - Rule Step Details Tab

Use this grid to enter the steps of the rule.

Note: Multiple views of this portion of the Define Rule page are available by selecting the tabs in the scroll area. We document fields that are common to all views first.

Rules usually begin with steps to truncate working tables (TL_IPT2-5 and other working tables) to create spaces within the working tables for processing steps in the rule.

Warning! Never truncate TL_IPT1. Doing so destroys the data.

Generally, order the rules by period. For example, if you have daily rules and weekly rules, the system should resolve the daily rules first.

Field or Control

Description

Step

Enter a value in this column to determine the processing order of the rule steps. Lower numbers indicate higher priority. Numbers can be up to three digits. Each number within this column must be unique. We suggest assigning numbers in increments of 10 so that you can insert steps later without renumbering the entire rule. The processing order is extremely important because it can directly affect payable time calculations.

Step Type

Select a value from the list. Valid values are:

(none): Select for the system not to use any effective date logic.

SQL Obj: Select to add a SQL object in this rule step. If you select this option, the Record (Table) Name column is unavailable.

Action: Select to add an action in this rule step. If you select this option, the Record (Table) Name column is unavailable.

Expr Text: Select to add expression text in this rule step. If you select this option, the component changes and the Expression Text page is visible.

Truncate: Select to truncate a table in this rule step. If you select this option, the SQL ID, Page Transfer, and Rule Step SQL Text button columns in the grid are unavailable.

SQL Object ID

Select the object to include in this rule step.

Action

Select the action to include in this rule step.

SQL ObjectSQL statement

To view the SQL text of the object you are adding to the rule, click the Rule Text button to access the Action SQL Text Resolution secondary page. You will not see the SQL text of other objects in the step list. To view the entire rule text, click the button at the top of the page.

SQL TextAdd

Click to view the details of the SQL object that you are adding to the rule step. You cannot modify the object.

Record (Table) Name

Select the table that you want to truncate, if applicable.

Define Rule Steps - Description Tab

Access the Description tab on the Define Rule page.

Field or Control

Description

Description

Enter a short description of what this rule step should accomplish.

Use the Action SQL Text Resolution page (TL_RULE_TEXT_SP) to view the SQL text of the rule step you are adding to a rule.

Navigation:

Click the Compile Rule button on the Rules page.

This example illustrates the fields and controls on the Action SQL Text Resolution page. You can find definitions for the fields and controls later on this page.

Action SQL Text Resolution page