Exporting and reusing rules

By default, rules created in an application are saved with that application. Alternatively, rules can be exported or saved to IBM® SPSS® Collaboration and Deployment Services Repository for use in multiple applications. In this case each application stores a reference to a specific, labeled version of the shared rule; any changes to the rule are automatically applied to all applications that use that version.

Exporting rules

From any application that contains a local rule you want to share, click the Export icon to save the rule to IBM SPSS Collaboration and Deployment Services Repository where it can be reused as needed.

  • When exporting multiple rules, specify whether you want to export them all in a single ruleset, or individual rules. In the case of individual rules, each segment is exported as a separate rule.
  • When exporting multiple selection rules, if you choose Store with Selections, a selection ruleset is exported. In this case you can export either inclusions or exclusions, but not both. If you need a mix of inclusions and exclusions, these need to be exported in separate rulesets. If Store with Selections is not selected, a segment ruleset is exported.
  • When exporting from an aggregation rule editor, if you choose Export with risk points, an aggregation ruleset is created. If this option is not selected, a segment ruleset is exported.

Using existing rules

  • In any application where you want to make use of a shared rule, click the Find an existing rule icon to browse IBM SPSS Collaboration and Deployment Services Repository for existing rules that can be reused in the current application.
  • To reference a specific labeled version, click the arrow next to the rule name and choose the desired version. If no version is selected, the latest is used. (Think of LATEST as a special label that is automatically rolled to each new version as it is created.) Using a specific labeled version is recommended to avoid unexpected results that can occur when a new version of a rule is created.

    Referenced rules can be combined with local rules in many cases, but are visually distinguished from local rules by bold text, and by an icon that indicates the type of rule (or ruleset). Referenced rules cannot be edited directly in the application where they are used, but can be edited in IBM SPSS Rules Management, which can be access from the Application Launch page. Note IBM SPSS Rules Management may not be installed at all sites or available to all users.

  • Alternatively, referenced rules can be converted to local rules and saved in the current application if desired. To do this, click the name of any referenced rule, and then select Convert to single rules in the Rule Preview dialog box.

Guidelines for sharing rules

When browsing and working with shared rules, the following guidelines apply:

  • Rules can be exported for reuse from any application, but once exported, can be edited in IBM SPSS Rules Management, and cannot be edited in any other application. Note that IBM SPSS Rules Management may not be installed at all sites or available to all users.
  • Using a specific labeled version (other than LATEST) is strongly recommended, particularly in a production environment, as ongoing changes the latest version may otherwise have unintended consequences. In certain cases, such as when referencing a rule from within a rule, a labeled version must be used.
  • Single rules can be added from IBM SPSS Collaboration and Deployment Services Repository by reference, or converted to local rules from the Rule Preview dialog box.
  • Single rules can be referenced and combined with local rules in any rule editor. If exported as a rule set, nested references to single rules will be preserved.
  • Segment and selection rule sets can be referenced and combined like single rules in most cases, but the combined rule set cannot be exported without first converting any nested rule sets to single rules. Thus an exported rule set can contain references to nested rules, but not to nested rule sets.
  • Aggregation rule sets can also be referenced, but cannot be combined with other rules, and cannot contain nested references to other rules. When referencing an aggregation rule set, the referenced rule replaces the entire contents of the aggregation rule editor. (Alternatively, if not referencing an aggregation rule set, the aggregation editor can contain a mix of local rules, referenced segment rules, and segment rule sets.)
  • When using IBM SPSS Rules Management, the same restrictions apply as for exported rules. Nested rules are allowed, nested rule sets are not. This is because IBM SPSS Rules Management is designed to create and edit shared rules (similar to exporting from any of the other applications).
  • To avoid any of the restrictions on referenced rule sets, whether in IBM SPSS Rules Management or elsewhere, a rule set can always be converted to separate, local rules.
  • Shared rules cannot contain references to external IBM Operational Decision Management rules.