Sometimes decision trees are effective procedures. Thus we have made it possible to implement traditional decision trees (such as the one at the beginning of this paper) using Maelstrom's syntax. Decision trees are implemented by specifying execution rules for scripts based upon the exit codes of others.
Three forms of policy control in Maelstrom allow forcing execution of specific scripts immediately after the failures or successes of others. Forced evaluation is a policy decision based upon what is most important in a network. One might wish, e.g., to minimize the impacts of a reboot by immediately checking specific services related to the reboot, before checking other facets of operation. Unlike the core scripts Maelstrom invokes, these are not interpreted as suggestions or theory, but directly control what Maelstrom does in specific situations.
All the execution controls mimic shell syntax for ease of use. Short-circuit `and' and `or' work as they do in the shell:
A || Bcauses script B to be invoked only if script A fails. Likewise,
A && Bcauses script B to be invoked only if script A succeeds. Equivalently,
!A && Bhas the obvious meaning. An advanced syntax allows reacting directly to exit codes:
A [ 23=>B; 34=>C ]means that if the exit code of A is 23, execute B, and if the exit code of A is 34, execute C.