Rule Definitions

Logistics > Rule Definitions

Compose logistical rules.

Rules consist of condition–answer pairs. A condition is a conditional expression that the system evaluates. The answer defines an action that the system performs if the condition is met, i.e. if the condition is evaluated to be true. An answer can point to another rule. If there are several conditions in a rule, the answer of the first expression that is true is executed. Each rule has a default answer that is used if none of the conditions is true.

Conditions and answers are expressed using logistical fields, variables and their values (constants), as well as functions and operators, and free text. See Variables and constants (rules) and Functions and operators.

Rules are saved in rule configuration files (.cfg).

Rule definition overview

When you start this function, the Rule Definitions dialog opens. Select the desired rule from the Description drop-down menu. The existing rule definitions in the rule are shown.

Do one of the following:

  • To add a new rule definition, click Add. Opens the Add dialog for adding new definitions.

  • To edit a rule definition, select it and click Edit. Opens the Edit dialog for editing the selected rule definition. The Add and Edit dialogs are identical.

  • To delete a rule definition, select the it and click Delete. Click Delete all to delete all rule definitions. Note that this deletes all definitions from the rule file but not the rule file itself.

  • To move the selected rule definition one step up or down within the rule file, select it and click Shift line up or Shift line down. Note that the first condition which is met will be executed and the rest of the conditions will be ignored.

  • To set the default answer for the rule, click Set. Opens the Set default answer dialog where you can compose an answer that is returned if none of the conditions are met. This dialog is identical to the Add and Edit dialogs.

  • To delete the rule file, click Delete rule.

  • To save the rule file, click Save. The Description is used as the file name. You can save a copy the rule with a different file name by entering a new description and then clicking Save again.

See Defining rules in System Management for detailed information.

To open the rule file in a text editor for editing, click Open rule file with text editor. See Rule configuration files for detailed information on how to edit rule in a text editor.