Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Place rules in the frame rule flow whenever you can and the window rule flow whenever you have to, for the purpose of dividing the rules into many simple frame rule flows instead of one big and complicated window rule flow (see creating vocabularies).

  • Divide the rules into the following rule sheets and rule sheet names (unless they have no rules. There's no need for empty rule sheets) -

    • <window or frame>_Fixed.ers - Fixed property settings.
    • <window or frame>_IsEnabled.ers - Rules for enabling form fields.
    • <window or frame>_IsVisible.ers - Form fields visibility rules.
    • <window or frame>_Pages.ers - Pages (tabs) visiblity rules and enabling or disabling pages.
    • <window or frame>_Messages.ers - Message rules (errors, warnings and info messages).

  • Complicated rules with conditions containing more than 5 to 10 fields and more than 5 to 10 combinations should be put in a separate rule sheets with their own descriptive name suffix.
    For example: EntscheidDetailBasisFrame_IsUnUpdatable.ers

  • Use the vocabulary fields not expressions in the condition and action panes unless you have to.
    For example: In the condition pane, do not use EntscheidDSO.Visum_Dat = null. Use EntscheidDSO.Visum_dat and null in the cell value.
    For example: In the action pane, do not use EntscheidDSO.isAvailable = true. Use EntscheidDSO.isAvailable and T in the cell value.

  • Beware of NULL's. Datasource field values are null when the record is not available so you may also want to add isAvailable and T cell value to your condition.
    For example: add EntscheidDSO.isAvailable and T cell value, to EntscheidDSO.Visum_dat and null cell value.
  • A specific property (like a form field is enabled property or any other property) must be set in one place and one place only. The property must be set in one rule sheet covering all the combinations. In either the frame or window rules but never both. Setting the same property in different rule sheets increases the risk of conflicts.

  • Use the default action column whenever possible to decrease the number of combinations and simplify rule sheets.
    For example: if you set the default for the is enabled property to false then you only need to specify the condition combination when it is true.

  • Use an AND condition in combination with the default column instead of an OR condition for setting properties to decrease the number of combinations and simplify rule sheets (because AND conditions use a single combination column while OR conditions use multiple combination columns). 

  • The fixed rule sheet should only be used for properties that have a fixed or constant value and should not be used for default values.
    For example: if the specification says this form field is always enabled.

  • The fixed rule sheet can also be used for setting custom properties by calling the custom JavaScript functions to fetch values (see incorporating code).

  • In the messages rule sheet, place the message text values in the cell action column and use the cellValue for the message parameter.
    For example: Message.new[type='info', entity='EntscheidDetailWindow', message=cellValue]

  • Every rule action should have a rule statement with a simple description (the descriptions will not be shown to the user) used internally for debugging and understanding what rules were triggered (see rule tests design). No need to add a rule statement for the default column (column 0).

  • Avoid dependencies - Avoid using calculated values from rule sheets. Only use values coming from the vocabulary.
    With the exception of Custom properties set with JavaScript functions (see incorporating code).

...