Ordered List

From TrainzOnline
Jump to: navigation, search

When started, the Ordered List rule starts it's child rules in succession. After executing the first child rule it waits for that rule to complete before starting the second child rule. It repeats this behaviour progressively until it has executed all of the child rules one after the other.

As the child rules are executed in a linear fashion there is never more than one child rule running at a time. Progressing through the list of child rules and executing each one in order is referred to as the ‘list cycle’. The final child rule must be complete for the list cycle to complete. Once this list cycle is completed, the Ordered List rule either completes itself or restarts the cycle depending on the settings selected in it's configuration dialogue.

Available options are:

• Run the child list cycle a specific number of times before completing.

• Run the child list cycle indefinitely.

The default configuration is to run through one cycle only, so the child rules are executed once and the rule then completes itself without repeating the cycle.

OrderedList.jpg

Ordered List is best suited to situations where a particular rule (Rule B) is required to be dependent on the completion of another rule (Rule A). By setting both Rule A and Rule B as child rules of an Ordered List, it's possible to ensure Rule B is only run if and when Rule A has completed.

Ordered List is one of several list rules for handling child rules in a specific way. See also Progressive List, Random List, Reset List and Simultaneous List.

Personal tools