Using business rules - overview
Business rules are used to tailor a SunSystems implementation to meet an organization's particular data entry and validation requirements. Business rules can be defined for many of the SunSystems data input and static data functions. When a function is used, the business rules are applied and actions are carried out depending on whether or not the rule criteria are met. A rule might validate the data entered and display error messages to the operator prompting for valid data, or it might set the correct data values automatically.
For example, when a journal is entered using Ledger Entry, a business rule might be defined to ensure that a particular product code is always entered on a transaction posting to a Sales account.
What are the Business Rule Elements?
A business rule always consists of:
- an Event Profile - this determines 'when' the business rule should apply by identifying a SunSystems function. For example, if the business rules are required when journals are entered manually the event profile would reference the Ledger Entry function.
- one or more Rule Sets - a rule set contains a set of validation rules that apply to the data being entered by the chosen function (identified in the event profile). It identifies the actions to be taken when the data does, or does not, meet the rules. For example, a rule might state that a particular analysis code must be entered on a transaction and if not an error message is displayed. In this case the action is to display the error message.
In addition, a business rule may also reference:
- Rule Messages - a business rule can display error or warning messages. These messages are defined separately and can be referenced on many different rules sets.
- Redefined Data Items - if a single system data item contains separate logical elements that need to be validated individually it can be redefined. This enables the logical elements to be identified as data items in their own right which makes the business rule much easier to define and maintain.
-
The data items for which the values are maintained in a rule data set are determined by the Rule Data Set Keys.
In addition, for each valid combination of values in the rule data set, one or more preset values can also be defined as the Rule Data Presets.
The first step in defining a validation business rule is to set up an Event Profile.