Defining the ruleset content and signature

You define the content of a ruleset and its signature.

A ruleset is an executable package that includes rule artifacts and other elements. It contains a set of rules that can be executed by the rule engine. You must define the ruleset content and the parameters that allow the client application to exchange information with the ruleset.

In a decision service, the decision operation includes all the settings needed to define the contents of the ruleset and its parameters.

In a classic rule project, the content is defined in a RuleApp project, and the parameters set in the properties of the rule project.

Ruleset content

The ruleset content is defined by specifying the following information:
  • The source rule project. All the rules and variables contained in this project and any of its dependent projects become eligible to be included in the ruleset.
  • You can specify any ruleflow to include in the ruleset.
  • Any queries or validators to filter the rules, so that only a subset of the rules of the source rule project and its dependent projects are included in the ruleset (see Extracting rules for a ruleset). Typically, this is used to include rules from specific packages of a project or according to a rule property such as status.

Ruleset signature

Client applications interact with a ruleset by using input and output parameters. These parameters are defined in the signature of a decision operation for a decision service. The ruleset signature is stored in a ruleset archive as an XML file.

For a classic rule project, the parameters are defined in the project properties.

The parameters of a ruleset can have three directions:
  • IN: The parameter value is provided as input to the ruleset on execution.

  • OUT: The parameter value is set by the execution of the ruleset and provided as output from the ruleset at execution completion.

  • IN_OUT: The parameter value is provided as input to the ruleset on execution and its value can be modified by the ruleset and provided as output at execution completion.

In a decision service, you create the parameters from any of the ruleset variables that are available in the rule projects that are part of the scope of the decision operation. Ruleset variables are internal to a ruleset and provide a way to exchange data between rules, functions, and tasks.

Note:

Only ruleset variables that are defined at the top-level package are eligible to be used as ruleset parameters.

For classic rule projects, you create ruleset parameters by right-clicking the project, selecting Properties from the list, and then selecting Ruleset Parameters in the side pane. Parameters that you create are added to the list of variables. Any part of the rule project can reference ruleset parameters: rules, decision tables, decision trees, rule tasks, and functions.

Note:

If you make changes to the verbalization in classic rule projects, you should refactor the changes in each rule that uses the ruleset parameter.