Understanding Conditions in Notifications

Understanding Conditions in Notifications

Conditions are used when defining global finds to determine which records are returned as results when the find is conducted.

Conditions are used in notification routines to restrict the generation and processing of notifications and to limit the recipients of notifications to a subsest of selected users.

To understand how to define conditions used in global findsnotifications, review the sections below.

Note: The concepts in this section are similar for Notifications and Finds. If you have read and understood this information in another part of the guide, you may skip this section.

Parts of Conditions

The condition editor provides the tools necessary to construct logical expressions (also called criteria) that are evaluated by the system to find objects in the databasedetermine whether or not a notification should be generated, and (if a notification will be generated) to determine which selected users should recieve the notification.

Each logical expression used in a condition is composed of the following distinct elements:

The purpose of these elements is to provide the syntax by which one operand is evaluated against another operand. The means by which the operands are evaluated against each other is called the relational operator. For example, in the mathematical expression “62 >= 2”, the numbers “62” and “2” are the operands and the greater-thanequals symbol (“>=“) is the relational operator. In Digital Storage Manager, the numerical operands of the mathematical expression “62 >= 2” are replaced by the contents of database fields, text, and in some cases, MetaScript. In the example above “62 >= 2” is replaced by “Request IDnew zUserName greater thanequal 300=Recipient().Name”. When the above logical expression is evaluated by Digital Storage Manager, the value indicated by the Request IDnew zUserName database field (first operand) is evaluated against the value indicated by the second operand (the number 300the user’s name indicated by the MetaScript code =Recipient().Name) to see if the prior is greater-thanequals the latter.

Evaluating Conditions

When evaluated by the system, conditions always evaluate to one of two possible outcomes: True or False. When the find condition evaluates to True for a record in the database, the system includes the record in the results of the find. For notification restrictions, conditions the condition is evaluated against the record for the folder/document type for which the notificaiton has been defined. If the condition evaluates to True, the system will continue processing the notification. If the condition does not evaluate to true, notification processing will stop and no notificaiton will be sent for the current event. For recipient restrictions, the condition is evaluated against each selected recipient. If the condition is true for a selected recipient, s/he will recieve the notification (or will be preselected as a recipient in the notificaiton confirmation window). If the condition does not evaluate to true for a selected recipient, s/he will not recieve the notification (or will not be preselected as a recipient in the notification confirmation window). When considering recipient restriction conditions, it is important to remember that the condition will be evaluated for all selected recipients...evaluatioin does not stop after the system determines that the recipient restriction condition is true (or false) for one of the selected recipients. Additionally, since the condition is only evaluated for selected recipients, it is impossible to define a condition that will result in a user not already selected (either individually or by group) recieving the notification. Additional details on constructing conditions for Global FindsNotifications can be found in “Setting Up Notifications” on page 529“Setting Up Global Finds” on page 453.

Compound Conditions

Up until this point, our discussion of conditions in Digital Storage Manager have used simple examples with each condition composed of one logical expression/criterion. Digital Storage Manager provides you with the capability to define compound conditions in your Global Findsnotification and notification recipient restrictions. That is, you can define conditions composed of multiple logical expressions.

Logical expressions in a compound condition are related to each other by one of two boolean operators: AND or OR. When compound conditions are evaluated by the system, the entire compound condition resolves to either True or False. When multiple logical expressions are related to each other by an AND boolean operator, each logical expression in the compound condition must evaluate to True for the entire (compound) condition to evaluate to True. When multiple logical expressions are related to each other by an OR boolean operator, only one of the logical expressions must evaluate to True for the entire compound condition to evaluate to True.

In the case of compound conditions that use both AND and OR boolean operators, an understanding of the system’s order of operations is essential to understanding how to define the logical expressions/criteria in your compound conditions and how the system will evaluate them.

Order of Operations

Order of operations refers to the order in which conditions are processed by the system. In the case of compound conditions composed entirely of AND or OR boolean operators, logical statements/criteria in the condition are evaluated sequentially from top to bottom. In the case of compound conditions composed of mixed (AND and OR) boolean operators, the conditions are evaluated a little differently: In Digital Storage Manager, the boolean operator AND has a higher priority than OR. For example, the notification condition:

Criterion1

and Criterion2

or Criterion3

will be interpreted by the system as “(Criterion1 AND Criterion2) OR Criterion3. In this example, both Criterion1 and Criterion2 must evaluate to True, or Criterion3 must evaluate to true for the compound condition to evaluate to True.

If you would like the notification condition to be interpreted as “Criterion1 AND (Criterion2 OR Criterion3)”, you must define the notification condition as follows:

Criterion1

and Criterion2

or Criterion1

and Criterion3

A notification routine with this send condition will generate a notification only when either Criterion1 and Criterion2 are both true or when Criterion1 and Criterion3 are both true.

 


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.