Close popover

Table of Contents

Creating a specialized or circumstance rule

Version:

You can create a specialized or circumstance rule to create a variant of the rule that can be triggered only conditionally. The created rule is resolved and active only when the specified conditions are met. Create specialized or circumstance rules to address dynamic business requirements without changing the core logic every time. For information about rule resolution exceptions and how they might affect circumstance rules, see Rule resolution exceptions.

The Save As and Specialize by toolbar tools are restricted to those users who hold the privilege @baseclass.ToolbarFull or @baseclass.ToolbarSaveAs.

Because the Specialization forms share most of the fields and functionality on the Create form, only exceptions and special cases are outlined in this topic.

  1. On the rule form, complete one of the following steps.

    • Create a rule that is specialized by class or ruleset.

      1. Select Save as > Specialize by class or ruleset.
      2. Provide a name for the specialized rule.
    • Create a circumstance rule.

      1. On the rule form, click Save as > Specialize by circumstance.
      2. Enter a name for the circumstance rule.
      3. Select one of the following types of circumstance: Template or Property and Date.
        • Click Template to create a template rule circumstance (by multiple properties) and then provide a template and a definition against which the template is evaluated. You must have at least one circumstance template rule created before you use it for circumstancing.
        • Click Property and Date to create a circumstance of a rule by a property, date, or a combination of both.

          • To create a property circumstance rule, provide the name of a property (for example, .pyStateName ) in the Property list and its expected value within quotation marks (for example, “MA”) in the Value box.
          • To create a date circumstance rule, enter a Date type property, start date, end date, or a combination of all of the options.

          Date combinations and business requirements lists the possible date combinations and the business-logic requirements they meet.

          If you do not specify a date property, the specified time period is always evaluated against the current system date.

          This rule is active during the specified time interval. At all other times, the base rule is active. During rule resolution, if two or more date circumstance versions are candidates at the current time and date, the application selects the candidates with the nearest end date. Of these, if multiple remaining candidate rules have the same end date, the application picks the candidate with the most recent start date.

  2. Optional:

    To override the default work item that your application associates with this development change, press the Down arrow key in the Work item to associate field, and then select a work item.

    For more information about your default work item, see Setting your current work item.

  3. Update the values in the Context, Apply to, and Add to ruleset lists as appropriate.

  4. Click Create and open.

  • Creating a circumstance template

    Create a circumstance template to specialize a rule by more than one feature.

  • Creating a circumstance definition

    You can create a circumstance definition to evaluate properties in a circumstance template.

  • Creating a redirected rule

    To create redirected rules, which are circumstance rules that are configured to reference other circumstance rules for the same base rules, complete the following tasks.

  • Base rules

    A base rule is the fallback rule selected by rule resolution when no other circumstance version's criteria is met. Base rules have no circumstance qualification.

  • Finding rules by circumstance

    To verify if an existing rule is either a base rule or a circumstance, open it in Dev Studio and inspect the form header. Click the Circumstanced link to see circumstance values or an indication that the rule is a base version. The link does not appear if the existing rule is neither a base nor a circumstanced version.

  • Specializing a case type

    Specialize a case type to support variations in the way that cases are processed in your application. Each version that you create is uniquely identified by a circumstance.

  • Date combinations and business requirements

    The following table lists the possible date combinations and the business-logic requirements they meet when you circumstance by date.

  • Setting rule status and availability

    Set rule status and availability to elaborate on the usage information that you provide, and ensure that users interact with the correct version of your rule at run time.

  • Creating a rule

    To save time and ensure that your projects adhere to the unique needs of your clients, create rules and data instances using reusable elements of your application. By combining a rule type, name, class, and ruleset, you provide a unique identity for each rule that you create.

  • Circumstance rule examples

    Assume that you have different pricing levels for your customers. You first define a base pricing rule for all customers. Then you qualify the base rule by creating circumstanced rules for customers at different buying levels. The property .CustomerType is part of the customer order and has values of "Silver" and "Gold". In this example, a customer has purchased a $100 item. Using the property and values, you create circumstanced instances of the base rules as shown here:

  • Contrasting time-qualified rules and historical processing
  • Circumstance templates

    Use a circumstance template rule to identify properties for multivariate circumstanced rules. A circumstance template rule contains an array of properties such as .State, .Channel, and .ClaimAmount that reference property values in one or more circumstance definition rules. These rules define the value combinations for each of the properties defined in the circumstance template rule.

Suggest Edit

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.