Rules


Rules

A "Rules Engine" allows various types of business rules to be written in a text format and easily applied to the system "on the fly" – without even logging out or shutting it down.  USPS-R comes with its own set of required business rules, as well as a number of optional business rules that the district may enable or disable as they desire.  Customized rules can also be written for each district, either by district personnel with the appropriate access to do so, or with help from their ITC or the SSDT.  A few examples of using customized business rules are custom validations, sending email or Twitter notifications, or even updating fields based on certain criteria.  These can also be used in conjunction with Custom Fields.

Bundled means it comes with the USPS-R software; Mandatory means the rule cannot be disabled.

The user would need at least a role that had MODULE_RULES granted in order to update a rule.  They would need at least MODULE_RULES_VIEW to see the list of rules but not be able to modify.

Usually, the admin roles have the MODULE_RULES permission granted


In order for the Rule to be set, user needs to click on and then .

Mandatory Rules

The following rules come with the software (bundled) and are mandatory in order to use the software.  They will be enabled automatically when the data is imported.  Mandatory rules cannot be disabled.

Rule Description
org.ssdt_ohio.modules.customfield.CustomFieldsCustom Fields are enabled so that user (with the correct permissions) can create them
org.ssdt_ohio.modules.rules.startup-eventsStarts up the Rules Engine.
org.ssdt_ohio.modules.rules.stream.startup-streamRules engine stream startup
org.ssdt_ohio.usps.model.employee.SaveEmployeeEnsure Employee number is not the same as Employee ssn when saving Employee
org.ssdt_ohio.usps.model.newcontract.NewContractCalculateCopy old compensation to new compensation
org.ssdt_ohio.usps.model.payrollaccounts.PayrollAccountsWarn user if no percentage payroll accounts are found and Ensure Payroll Accounts with rate type percent add up to 100%
org.ssdt_ohio.usps.model.payroll.PayrollUnpostCannot Unpost Imported Historical Payroll and Cannot Unpost Historical Payroll Not in Current Period
org.ssdt_ohio.usps.model.postingperiod.PostingPeriodPosting period may not be re-opened because it is more than one year prior to the current period
org.ssdt_ohio.usps.model.user.RoleChangeUser Can Not Change, Create or Delete A Role With An Underscore (SSDT created Roles)

Bundled Rules that are not Mandatory

The following rules come with the software but are not mandatory in order to use the software.   By default, Bundled rules are enabled but can be inactivated.

RuleDescription
org.ssdt_ohio.authnz.authnz-default-passwordDefault Password Rules
org.ssdt_ohio.authnz.authnz-stream-rulesAuthentication: Default Breakin Detection and Evasion
org.ssdt_ohio.usps.model.attendancejournal.MaxAdvancedSickLeaveErrorRule to prevent Advanced Sick Leave balance from going past Max Advanced allowed
org.ssdt_ohio.usps.model.attendancejournal.NegativePersonalBalanceErrorRule to prevent Personal Leave balance from going negative
org.ssdt_ohio.usps.model.attendancejournal.NegativePersonalBalanceWarningRule to warn user when Personal Leave balance will go negative
org.ssdt_ohio.usps.model.attendancejournal.NegativeSickBalanceErrorRule to prevent Sick Leave balance from going negative
org.ssdt_ohio.usps.model.attendancejournal.NegativeSickBalanceWarningRule to warn user when Sick Leave balance will go negative
org.ssdt_ohio.usps.model.attendancejournal.NegativeVacationBalanceErrorRule to prevent Vacation Leave balance from going negative
org.ssdt_ohio.usps.model.attendancejournal.NegativeVacationBalanceWarningRule to warn user when Vacation Leave balance will go negative
org.ssdt_ohio.usps.model.employee.EmployeeDuplicateSsnErrorError: Prevent Employee with duplicate SSN from being saved
org.ssdt_ohio.usps.model.employee.EmployeeDuplicateSsnWarningWarning: Employee with duplicate SSN has been saved
org.ssdt_ohio.usps.model.employee.EmployeeEmisCompensationWarningRule to warn user when Employee report to EMIS is false but compensations exist with report to EMIS set to true
org.ssdt_ohio.usps.model.modeltransaction.ModelTransactionThis rule is to prevent certain entities from being created, updated, or deleted if the posting period assigned to them is not open.  Currently, this affects adjustments and historical payrolls.  So if an adjustment is created with a transaction date that is within a closed posting period, the user would receive an error that they can not create the adjustment because the posting period is not open.  Same if they were to try to modify or delete an adjustment with a date that fell within a closed posting period.  For the historical payroll, the pay date has to be within an open posting period when posting or they will receive an error.
org.ssdt_ohio.usps.model.payrollitem.FederalCovidAmountErrorError: Prevent Federal Covid-19 amounts from exceeding maximum values

Highlight Viewer

To use the 'Highlight Viewer', select the row in the grid to view.  The 'Highlight Viewer' on the right hand side will appear:

Allowing of Max Advanced Sick Leave

The following grid shows the rule for the allowing of Advanced Sick Leave balance from going past the Max Advanced allowed. 

For example, if the rule to prevent Advanced Sick Leave balance from going past the Max Advanced amount allowed is true, the district will then receive an Error and it will not allow the transaction. 

The Advanced sick leave cannot exceed advanced units used.  When trying to add the Absence in Attendance, an error will be created.



Allowing of negative Personal, Sick and Vacation Leave

The following grid shows the rules for the allowing of negative leave balances for Personal, Sick and Vacation Leave.  For example, if the rule to prevent personal leave balance to going negative is true, the district will then receive an Error and it will not allow the transaction for that leave to go negative. But if the rule to Warn the user when the personal leave goes negative is True, the system will give a warning error but allow the absence transaction to be posted.  There are individual rules for each type of Leave. 


Prevent Employee with duplicate SSN from being saved

 There are two new rules added for the duplicate employee SSN:

  • Error: Prevent Employee with duplicate SSN from being saved.  Produces an error and prevents the user from saving.  By default, the rule to produce the error is enabled
  • Warning: Employee with duplicate SSN has been saved. One will warn the user there is a duplicate but allow the user to save the employee


Warning: Employee with duplicate SSN has been saved

Rule to warn user when Employee report to EMIS is false but compensations exist with report to EMIS set to true

Rule to prevent Federal Covid-19 amounts from exceeding maximum values

If the rule is checked and district is adding amounts over the max amounts in Federal COVID-19 fields, once they try to Save the updates, Errors will appear:

Create

  1. From the System menu select 'Rules'
  2. Click on
  3. Enter in required rule information:

Field Definitions

  • Name - Enter in the Name of the New Rule
  • Description - Enter a Description of the Rule
  • Bundled - If Bundled is checked this means it came with USPS-R. 
  • Mandatory - If Mandatory is checked it means it can not be disabled.
  • Event Stream - 
  • Enabled - The district can Enable or Disable Rules at anytime.  Check the enabled box if the user wants it to be in affect the next time the rulesets are activated
  • Text - 

     4.  Click on  to ensure rule is correct

     5.  Click on  to create the rule, click on  to not create the rule.

Activate

Rules do not take affect as soon as they are saved.  In order to make a new or changed rule take affect, the user would click on .  This will reload all of the enabled rulesets and they will become effective immediately.

Search

The Rules grid allows the user to search for existing Rules on the system by clicking in the filter row in the grid columns and entering in the desired information. Click on any row of the search results to see a summary view of the record.  The Advanced Search can be utilized by clicking on the   in the upper right side of the grid.

Edit

The options listed will depend if the rule is bundled and/or mandatory. If the rule is bundled and mandatory a user will only be able to view it. If the rule is bundled and not mandatory the user will be able to view or disable it. If the rule is not bundled then the user will be able to edit, delete or disable it. 

Click on the   in the grid beside the Rule to edit the record.

Disable Rule

A rule may be disabled if it is not mandatory.

  1. From the System menu select 'Rules'
  2. Search for desired Rule
  3. Click on
  4. Uncheck the
  5. Click on and close the pop up window
  6. Click on in order for the change to go into affect

Enable Rule

A disabled rule may be enabled at any time.  

  1. From the System menu select 'Rules'
  2. Search for desired Rule
  3. Click on
  4. Check the 
  5. Click on and close the pop up window
  6. Click on in order for the change to go into affect

Delete 

Click on the    in the grid beside the desired rule.  A confirmation box will appear and you will be asked to confirm that you really do want to delete this rule. A rule may be deleted if it is not bundled.

More Information

Customized rules can also be written for each district, either by district personnel with the appropriate access to do so, or with help from their ITC or the SSDT.  A few examples of using customized business rules are custom validations, sending email or Twitter notifications, or even updating fields based on certain criteria.  These can also be used in conjunction with Custom Fields