Rule Sequences

This chapter covers the following topics:

Introduction to Rule Sequences

A Rule Sequence is a set of rules that are ordered sequentially according to their effective dates. Any type of rule can participate in a Rule Sequence, including Configurator Extensions.

A rule in a Rule Sequence becomes active only when its predecessor becomes inactive. Inactive rules are ignored at runtime. Create a Rule Sequence when you want to automatically deactivate one rule and activate another at a specific point in time. Effective dates are explained in Introduction to Effectivity .

You define effective dates for each rule in a Rule Sequence to determine when each rule in the set becomes active, how long it is used, and when it becomes inactive. Since a rule must become active as soon as its predecessor becomes inactive, modifying the effective date of one rule in a Rule Sequence can affect the effective dates of at least one other rule in the set. Each rule in a Rule Sequence can either have an effective date range defined or be assigned to an Effectivity Set. See Rule Sequences and Effectivity Sets .

When you create a new Rule Sequence, it contains no rules. You must then add rules to the Rule Sequence either by moving existing rules into the Rule Sequence, or by creating new rules within the Rule Sequence. By default, the effectivity of the first rule you add to a Rule Sequence is Never Effective. You can then modify the rule’s start and end dates and add other rules to the sequence. Each rule that you add to a Rule Sequence appears at the end of the sequence and is also Never Effective by default.

The effective dates of rules in a Rule Sequence cannot overlap. When you modify the effectivity of a new rule in a Rule Sequence, Configurator Developer ensures that the new rule’s effectivity does not overlap with any other rules in the sequence.

You can delete a Rule Sequence, but doing so also deletes all of the rules it contains from the configuration model.

Creating Rule Sequences is explained in Creating a Rule Sequence. Removing rules from a Rule Sequence is described in Removing Rules from a Rule Sequence.

Viewing Rule Sequences

You can view and modify Rule Sequences in the Rules area of the Workbench. Configurator Developer uses a unique icon to distinguish Rule Sequences from rules. Rules that belong to the Rule Sequence appear as children of the Rule Sequence node, and are listed in the order in which they appear in the sequence. This order corresponds to the chronological order in which each rule in the set becomes active over time.

A Rule Sequence’s details page lists all rules that the Rule Sequence contains. From this page you can reorder rules in the sequence, or edit a rule’s details (such as its effective dates). For details, see Reordering Rules in a Rule Sequence.

Modifying the Effectivity of a Rule in a Rule Sequence

After adding a rule to a Rule Sequence, you can change the rule’s effective dates or modify the Effectivity Set to which it is assigned. When you do this, Configurator Developer adjusts the date ranges of the rules that precede and follow that rule (if any) to maintain the constraints inherent in the sequence. If this is not possible, Configurator Developer displays an error and does not change the rule’s effectivity.

Following are a few examples of what occurs when you modify effective dates for rules in a Rule Sequence:

Rule Sequences and Effectivity Sets

To learn about Effectivity Sets, see Effectivity Sets.

When you modify an Effectivity Set’s start and end dates, and the Effectivity Set contains members of one or more Rule Sequences, Configurator Developer displays any error conditions associated with Rule Sequence date constraints and rejects the new date(s). If there are no errors, Configurator Developer applies the new dates to each rule and adjusts the effectivity dates of each rule in the Rule Sequence as necessary.

Sometimes modifying a Rule Sequence requires a change to a rule’s effective dates that conflicts with the effective dates of the Effectivity Set associated with the rule. In this case, the rule whose effective dates need to be changed will be disassociated from its Effectivity Set and the new effectivity dates will be applied directly to the rule itself. When this occurs, Configurator Developer displays a warning message and you can choose to either accept the new effectivity dates, or cancel the operation.

Some examples of how this situation can occur include:

Reordering Rules and Rule Effective Dates

Following are some examples of how effective dates may change when you reorder rules in a Rule Sequence:

To reorder rules in a Rule Sequence, see Reordering Rules in a Rule Sequence.

To remove a rule from a Rule Sequence, see Removing Rules from a Rule Sequence.