...
Info |
---|
Incorrect use of business rules in Framework ECM may cause errors and/or unpredictable behaviour. If unsure how to implement business rule changes, please contact your Framework Solution Provider. |
Any field in the Framework ECM database may have none (0) or more rules associated with it. For a new value to be accepted by that field, all rules of this field must evaluate to true.
...
- 49882 - field context ID (long)
- ‘2/4/99 - literal value (date)
- ‘$4,500 - literal value (currency)
- ‘Hooper - literal value (string)
- ‘1:00 PM- literal value (time)
...
Info |
---|
If operands are of different types, an error will be generated. |
Creating Clauses
If the value of the left operand is null (missing, empty, “”, white space, unknown, undefined), the clause is False.
...
- [86 > %5.5%91] - Field 86 must be greater than 5.5% of field 91
- [86 > *10*91] - Field 86 must be greater than 10 times field 91
- [86 > -2-91] - Field 86 must be greater than field 91 minus 2
- [86 = +12+91] - Field 86 must equal field 91 plus 12
- [86 != /4.0/91] - Field 86 must not equal field 91 divided by 4
Info |
---|
...
The units of the parameter in the operation depend on the operation or the value of the field’s type. For all *,/ and % operations, the parameter is converted to a floating point double beforehand. For + and – operations, the parameter is converted to the same type as the field value. This may be numerical, date (days), time (minutes), currency (dollars), etc. |
Using the third example above, if field 91 is a date, field 86 must be greater than field 91 minus 2 days.
...
- [2123 <= 2135]
- Base Complete Date (2123) must be less than or equal to Frame Complete (2135)
Rule for Drafting: Drawings (generic) Ordered e.g Contract Drawing Ordered
For rules to work on the generic Admin\Drafting screen you will need to write a rule within the Generic Drafting table that will include a clause for the Drawing Type ID (e.g Contract Dwgs Type ID = -16 in below example), since the generic drawings record may be one of many different types.
([notNull<56>] OR ([17229 != '-16] OR [isNull<17224>]))
- To enter a Contract Drawings Ordered date, the must be a Colour Selection Complete Date
Note: if the Drawing 'Ordered' field is used on a custom screen e.g. Admin Overview - you will need another rule to ensure it's caught there
Business Rules - Rule Control
A rule belonging to a specific field can be found in the rms_ctxBRule table, indexed by the Field Context ID (l_rms_fieldCtx_id) and the Region Context ID (l_context_id) - the region division to which the rule belongs.
- Individual rules can be switched on and off in the f_customRule field
- The message displayed to the user when a rule is violated is stored in m_notes
- The ID of the context the rule belongs to is stored in l_context_id
- Rule enforcement is enabled for a specific context (e.g.: region division) in the l_rDiv_id field in the rDiv table, and changes at log on/off. The l_context_id of 0 will apply a rule to all regions/divisions.
Info |
---|
...
When a rule has been violated in Framework ECM, the screen remains in edit mode to enable the user to modify the offending fields to valid values. If the user cancels at this point, ALL CHANGES WILL BE LOST, including changed fields that satisfied their business rules. |