There are three types of variables available: global, rule set, and temporary.
Global variables
Global variables exist at a global level and are accessible from all instances of all rule sets in the system. The most common use for global variables is to isolate external references that are needed across multiple rule sets. For example, if multiple rule sets are configured to send the site administrators emails when there is a problem, a global variable could be used to store the email addresses. Another possible use is persisting processing or execution state that is calculated from multiple rule sets. For example, if a user has multiple rule sets that produce plates and they want to track the total number of plates produced, a global integer variable could be used to track the number.
Rule set variables
Rule set variables exist within a rule set and are accessible from all instances of that rule set. The most common use for rule set variables is to isolate external references that are needed only within one rule set. For example, if a UNC share is only used by a single rule set, a string rule set variable could be used to specify the share. Another use for rule set variables is to persist processing or execution state that can be tracked from a single rule set. For example, if only a single rule set is ever used to produce plates, an integer rule set variable could be used track the number of plates produced.
Temporary variables
Temporary variables exist within a rule set instance and are therefore accessible only from that instance. The main use of temporary variables is simplifying complex event property references. For example, temporary variables could be used for eliminating tedious Previous.Previous... references, such as in an XML-driven workflow. The values in the XML file could be assigned to temporary variables, which will then be used in the rule chain where needed. Similarly a temporary variable can be used to persist a property value from a previous event in a long running rule chain when the property will no longer be available when the chain completes.