Difference between revisions of "Rules and Rule Sets"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 63: Line 63:
:: Use this option for actions that should action whenever the Rule is invoked
:: Use this option for actions that should action whenever the Rule is invoked


:* '''When Specified Conditions are True-'''  
:* '''When Specified Conditions are True'''  
:: Use this option to specify a series conditions that determine whether the Rule's actions are carried out.
:: Use this option to specify a series conditions that determine whether the Rule's actions are carried out.
::* '''All of the Conditions are met -''' Every condition in this category must be satisfied  
::* '''All of the Conditions are met -''' Every condition in this category must be satisfied  
Line 70: Line 70:
:::[[File:RuleCondition.png|border]]
:::[[File:RuleCondition.png|border]]


:* '''When Specified Expression is Ture -'''  
:* '''When Specified Expression is True'''  
:: More complex conditions can be specified using the [[Expression Builder]]. For example, here is an expression that checks for either P1 or P2 priority on a new case:
:: More complex conditions can be specified using the [[Expression Builder]]. For example, here is an expression that checks for either P1 or P2 priority on a new case:
:::[[File:RuleExpression.png|border]]
:::[[File:RuleExpression.png|border]]

Revision as of 03:00, 5 December 2012

A Rule is an if-then statement that says, if one or more conditions are met, then take one or more specified actions. A Rule Set is a collection of such rules.

About Rules and Rule Sets

The ServiceDesk interface makes it easy to define rules by selecting fields and specifying matching criteria. When satisfied, the criteria causes any and all actions associated with the Rule to be carried out.

Rules are defined in Rule Sets. Both Rules and Rule Sets can return a value, or simply carry out one or more actions. When satisfied, a Rule can cause processing of the current Rule Set to stop (after taking associated actions), or it can allow processing of the Rule Set to continue with the next Rule in the series.

Rule Set Chaining

Rule Sets can be chained, which means that a Rule can cause a different Rule Set to be processed. When that Rule Set finishes, the processing of the original Rule Set resumes where it left off. (Chaining can go to an arbitrary depth.)

Rule Actions

Each Rule can carry out multiple actions. Here are the actions that a Rule can perform:

  • Change Status - Change the status of a Case--for example, to mark it as closed
  • Change Record Owner - Determine the new owner of the Case record
  • Complete Milestone - Mark a processing stage as completed
  • Execute Rule Set - Chain to a different Rule Set, and execute those Rules
  • Invoke Method - Invoke a method in a Java Class
  • Post Message in Relay - Deliver a message to a social-networking Relay feed
  • Send Email - Send a message, optionally using an Email Template
  • Return Expression - Return a value defined by an expression
  • Designate a User or Role - Select a user or role. Usually used to determine who is responsible for the case, or for the next step in its handling
  • Return Java Method Results - Return a value generated by a method in a Java Class
  • Update Record - Make a change to the Case record

Working with Rules and Rule Sets

Creating or Modifying a Rule Set

  1. Go to Designer > Case Types > {case type} > Rule Sets
  2. Click [New Rule Set], or visit an existing one
  3. Fill in the Rule Set properties, below
  4. Click [Save]

Rule Set Properties

  • Title - The title you'll see when referencing the Rule Set in the ServiceDesk interface.
  • Name - The name used by programmers. A default version of the name is created from the title, but it can be edited, if desired.
  • Enabled - Whether or not the Rule Set is currently in force. (Disable a Rule Set to temporarily deactivate it, without deleting it.)
  • Use for Inbound Emails - The rules will operate on incoming email messages. (Email fields like To and Subject will be available for processing.)
Learn more: Email to Case
  • Return Type - If the Rule Set will return a value, specify the type of value -- Boolean (true/false), Number, String, Date, a User/Role, or None.
  • Description - Write a descriptive summary here.

Rule Set Example

Here's a sample Rule Set that is intended to determine the owner for a case:

File:RuleSetExample.png

Creating or Modifying a Rule

Once a Rule Set is created, you can add Rules to it.

  1. Go to Designer > Case Types > {case type} > Rule Sets
  2. Click [New Rule Set], or visit an existing one
  3. Click [New Rule]
  4. Define the Rule, as shown below
  5. Click [Save]

Basic Information

  • Name - The name of the Rule, displayed in the ServiceDesk interface.
  • Enabled - Whether or not the Rule is enabled. (Disable the rule to deactivate it without deleting it.)
  • Description - A descriptive summary
  • On Success - Whether toStop processing other rules in the Rule Set, when these Rule conditions are satisfied, or whether to Continue processing other Rules.

Execution Criteria

  • Unconditionally (Always)
Use this option for actions that should action whenever the Rule is invoked
  • When Specified Conditions are True
Use this option to specify a series conditions that determine whether the Rule's actions are carried out.
  • All of the Conditions are met - Every condition in this category must be satisfied
  • Any of the Conditions are met - At least one of the conditions in this category must be satisfied.
For example, here is a sample Rule that checks for a variety of conditions, to show the kinds of possibilities that exist:
File:RuleCondition.png
  • When Specified Expression is True
More complex conditions can be specified using the Expression Builder. For example, here is an expression that checks for either P1 or P2 priority on a new case:
File:RuleExpression.png

Actions to Perform

  1. Select the Action to perform when the Rule conditions are satisfied.
    File:RuleActions.png
  2. As with conditions, additional options appear, depending on the action you select.
    RuleActionOptions.png
  3. Click [Add More] to specify additional actions.
    RuleActionsAddMore.png