IssueNet Online Help System

www.elsitech.com

Conditions

Modified: 2009/03/24 15:28 by Jeff Bishop - Categorized as: Administrator, Architect

Edit

1 What are Conditions?

An IssueNet Condition is a statement that IssueNet can evaluate to a true or false value. Conditions are designed to provide a simple way to enforce business rules and automate business processes. The most common uses of Conditions are to ensure that users have entered required data in a correct format at different points in a business process, and to determine when Actions and Triggers should be executed. Like an Action, once a Condition has been created if can be reused throughout your business process. Conditions can be linked to workflow transitions, triggers, conditional actions, and forms. The following are examples of common kinds of Conditions and their uses:

  • A Condition can be used determine if a user has entered an estimated time value for a task. If this type of Condition is linked to a workflow transition it can be used to prevent a user from transitioning a task to a particular workflow state until the correct data is entered.
  • A Condition can be used to determine is a user is a member of a particular security group or if an issue has a particular status value. If this type of Condition is linked to a form, it can be used to determine what form is presented to a user based on their security group membership or the current status of an issue.
  • A Condition can be used to determine if an item is a member of a particular class. If this type of Condition is used in a Conditional Action it could determine which workflow is executed based on the type of item a user has submitted.
  • A Condition can be used to determine if the value of an item has changed. If this type of Condition is used in a Trigger it could cause a notification to be sent when the priority or assignment of a task has changed.

Edit

2 Creating and editing Conditions

ScreenCap

Conditions are created in the condition editor. The editor helps you build an expression that IssueNet can evaluate to a true or false value. Once you have built a condition it can be used as a part of workflow transitions, triggers, conditional actions, and forms. Conditions can be simple expressions consisting of a single statement or compound expressions where multiple statements are evaluated together using the logical operators “AND” and “OR”.

Each statement in a condition consists of two values that are compared using an operator. Therefore, the process of building a simple condition consists of three general steps:

  1. Specifying the value for the left hand side of the operator
  2. Picking the operator you want to use to compare the two values
  3. Specifying the value for the right hand side of the operator

The left hand value of a condition is always specified using a variable. Using the Variable Editor you specify a variable that returns the kind of information you want to compare to the value on the right hand side of the operator. Variables can be used to return the values for the current user, current contact, current object, properties of the current object as well as other information specific to the execution of a workflow.

For example, if you want to create a condition that would compare the priority value of the current object to another value you would enter the following variable in the first box on the condition form: $(CurrentObject.Priority). Similarly the variable, $(WorkflowTask.EstimatedTime) could be used in a condition to check the value of the estimated time property of a task during the execution of a workflow transition.

Once you have specified the variable you want to use to return the value you want compare you can then pick an operator. Most of the available operators are standard logical operators such as “is equal to” or “is not equal to”. However, some operators are specific to IssueNet and evaluate values based on information and relationships specific to the design of IssueNet. Definitions of each operator are available here. However, two of these operators are of specific interest:

  • The “is kind of” operator is used to determine if an object is a member of a particular class or derived class. This operator is particularly useful when you want to execute and action only if an item is of a particular type. For example, if an issue is a member of a class named “Defect” as opposed to a more generic issue type you could use a condition in a workflow to execute an action to generate an additional task for a compliance officer.

  • The “is group member” operator is used to determine if a user is a member of a particular group. This operator is most useful when you want to create a condition that will allow or deny a workflow transition based on group membership.

Once an operator has been selected, you can specify the value used for the comparison. The Type box allows you to pick how you want to specify the comparison value. You should pick a value type based on how you want to identify the comparison value. For example:

If the value you are comparing to is a string, you can specify a string value for comparison by selecting “String” in the Type box you can enter a string in the box below. If the value you are comparing to is a class using the “is kind of” operator you can select “Class” from the Type box and the condition editor will allow you to pick a class and enter the class ID in the statement.

Once you have entered the values you want to compare and the operator to compare them, you can then click the Insert button to enter the statement into the expression. Once you have inserted one statement you can create additional statements and insert them into the same expression. By selecting the “And” and “Or” buttons you can determine the logical relationship between the individual statements in the expression.