Environment Manager
This page refers to an older version of the product.View the current version of the User Help.
Flow Control Conditions
In this section:
About
Flow Control Conditions
The Flow Control condition group contains the following conditions:
Condition | Description | Computer Trigger | User Trigger |
---|---|---|---|
If Condition (and Else If Conditions) | These create containers for conditions within an If Else group that enable advanced flow control by allowing standard If/Else If/Else logic found in most programming languages | Yes | Yes |
Counter | A condition to control the number of times child actions and conditions are run or evaluated in a single session. Use the counter field to select the required number; the minimum value that can be added is 1; there is no maximum value. | Yes | Yes |
If Conditions
An If condition creates a logical container in which a group of conditions can be configured together and evaluated in turn. When one of the conditions is met, any associated conditions and actions are run and evaluation of the group stops. A final, default action can be configured to apply if none of the conditions are met.
The condition is created using an expression builder which by default contains an If condition and an Else section. Optional Else If conditions can be added as required.
Create an If Condition
-
In the Policy Configuration navigation tree, create a new node or select an existing node to which you want to add the condition.
If conditions cannot be created within Reusable conditions.
-
On the Conditions ribbon, select Flow Control > If Condition.
The Expression Builder is displayed in the If Condition dialog.
The Expression Builder is used when creating If and Else if containers to configure the conditions which the user or endpoint is evaluated against.
Conditions and Reusable Conditions are added to the Expression Builder and configured using the same dialogs and in the same way as conditions are in any node. Any number of conditions can be added to the Expression builder and the same AND and OR rules which apply to conditions in any other nodes. Normal rules also apply as to which triggers conditions can be applied. For example, User conditions cannot be created in Computer Startup triggers.
- Select the Conditions or Reusable Conditions drop-down and choose the required conditions to be added to the Expression Builder.
- Select the Stop Sub Nodes on Fail and the Enabled checkboxes to the condition as required. At least one condition must be enabled.
- Repeat steps 3 and 4 to add more conditions.
- Enter a Description in the Expression Builder. This text is used to name the first (If) condition in the configuration and is mandatory.
- Enter an If Group Description. This text is used to name the group of conditions in the configuration.
-
Click OK.
An If Else Group is created in the selected node. The group contains the If condition as configured in the Expression Builder and an Else section which is automatically created.
- Select the If condition and add the required action(s) and condition(s) from the appropriate tab. Multiple actions and conditions can be added at the same level or nested to as many levels as required.
- Select the Else section and add the required action(s) and condition(s). Multiple actions and conditions can be added at the same level or nested to as many levels as required or the section can be left empty. If the Else section is left empty and none of the If or Else If conditions are met, processing for the group completes without an action being carried out.
-
Select the Stop Sub Nodes on Fail and the Enabled checkboxes for added actions and conditions as required.
If conditions and Else sections cannot be cut, copied or pasted. However, the conditions and actions within can be cut, copied and pasted as normal behavior for actions and conditions.
The configuration below shows a default If Else group with one If condition and one Else section:
When the trigger is fired the group is evaluated as follows:
- The If condition is met - The associated action is carried out and evaluation of the processing of this group stops.
- The If condition is not met - The action is ignored and the Else action is carried out.
- An action is not associated with the Else section - No action is carried out for the whole group.
Further conditions can be added to If conditions and the Else section to add extra levels of evaluation:
When the trigger is fired, the group is evaluated as follows:
- The If condition is met - The child condition is evaluated. If this condition is met the associated action is carried out and group processing stops. If the child condition is not met the Else section is evaluated.
- The Else child condition is met - The associated action is carried out and processing stops.
- The Else child condition is not met - No actions are carried out for the entire group.
Create an Else If Condition
An Else If condition is an optional If condition which can be added between an If condition and an Else section. Else If conditions function in exactly the same as an If condition in that any number of conditions and actions can be applied.
- Select an If or an existing Else If condition.
- On the Conditions ribbon, select Flow Control > Else If Condition.
- Click the Conditions or Reusable Conditions drop-down and select the required condition. As many conditions can be added to the Expression Builder as required.
- Enter a Description. This text is used to name the Else If expression in the group and is mandatory.
-
Click OK.
The Else If condition is created.
-
Select the Else If condition and add the required action(s) from the Actions tab. Multiple actions can be added as required.
Multiple Else If conditions can be added at the same level in the configuration. Repeat the above process to add further Else If conditions.
Else If conditions work in the same way as If conditions; if the condition is met the associated action is carried out and evaluation of the group ceases and if the condition is not met, the action is ignored and the next Else If condition or Else section is evaluated.
Else If conditions and the actions and conditions within, can be cut, copied and pasted.
The example group below evaluates the user group at logon and creates a relevant folder on their C drive.
When a user in the Administrators user group logs onto a managed endpoint, the following evaluation takes place:
-
Is the user a member of the Users group? No.
The related action is not applied and the next condition is evaluated.
-
Is the user a member of the Administrators group? Yes.
The action associated with that condition is carried out; a folder called Administrators is created on the user’s C drive. As a condition has been met, no further evaluation occurs for this group.
When a user in the Developers user group logs onto a managed endpoint, the following evaluation takes place:
-
Is the user a member of the Users group? No.
The related action is not applied and the next condition is evaluated.
-
Is the user a member of the Administrators group? No.
The related action is not applied and the next condition is evaluated.
-
Is the user a member of the Power Users group? No.
The related action is not applied and the next condition is evaluated.
-
The user is not a member of any of the user groups specified in the conditions.
The Else action applies by default and a folder called Guests is created on the user’s C drive.
Stop Sub Nodes on Fail and If Conditions
The Stop sub nodes on fail option prevents a failed action continuing to execute any dependent sub actions or conditions. Normal Stop sub nodes on fail behavior applies to actions and conditions within If conditions. However, Stop sub nodes on fail cannot be applied at the group level or to any of the following:
- If conditions
- Else if conditions
- The Else section
The Stop Sub Nodes on Fail checkbox for these conditions and containers cannot be selected.
Delete If Conditions
The following deletion rules apply for If conditions:
- If conditions cannot be deleted from a group
- The Else section cannot be deleted from a group
- Else If conditions can be deleted and multiple Else If conditions can be deleted when selected using Ctrl or Shift. The delete will not work if an If condition or the Else section is included in the selection
Counter
The Counter condition allows the child actions and conditions to be run a specified number of times within a single session. For example, an action could be set to run only for the first three times an application is used in a session. If the application is run again, the action will not run.
Where multiple Counter conditions exist within a single trigger, the uppermost condition in a hierarchy overrides any child conditions.
In the example below, all actions run once as defined by the first condition. The child condition to run twice per session is ignored.
Flow Control replaces the Run Once condition in the 8.0 console which can be replicated by setting the counter to 1. On upgrade from 8.0, any Run Once conditions are upgraded to Flow Control conditions automatically.
Create a Counter Condition
- In the Policy Configuration navigation pane, select a node or create a new one.
- Counter conditions can be added to all triggers
except the following as these only run once per user session or on endpoint
startup:
- Computer Startup
- Computer Shutdown
- User Logon
- User Logoff
- In the work area, select an action or condition.
- In the Conditions ribbon, select Flow Control > Counter and select the number of times child conditions and actions will run. The minimum value that can be added is 1; there is no maximum value.
- Click OK.
Related Topics
Copyright © 2019, Ivanti. All rights reserved.