Condition Behavior |
Overview
Automate Enterprise conditions are objects that are often used to trigger workflow execution. However, they can also alter a workflow's path depending on whether or not a particular event or condition has transpired or enable a workflow to wait (by suspending its execution) until a specified event takes place. All available conditions encompass behavioral properties that dictate how they should react when an observed event or condition is met. These properties are significant in determining whether the condition should behave as a trigger, conditional object or wait element. If a condition is instructed to wait, other options are available that direct how long and/or how often it should wait.
An existing condition's behavioral properties can be accessed from Workflow Designer (WFD) by double-clicking the condition or right-clicking the condition and selecting Edit from the context menu. A dialog titled 'Edit Condition' which displays the properties of that condition opens (as shown below). Expand Behavior to view or edit the behavioral properties. Alternatively, a condition's properties can be accessed from Server Management Console (SMC) by navigating to Repository > Conditions and double-clicking the desired condition or right-clicking it and selecting Edit from the context menu. Behavior parameters are identical in all conditions.
Parameters
Behavior properties are comprised of two main parameters that primarily determine the overall behavior of a condition. These parameters dictate to the workflow whether or not it should wait for the monitored condition to take place. The available options are:
-
Wait for Condition - The workflow will wait (either indefinitely or until a specified length of time) for the condition to occur. Select this parameter if the Automate condition should act as a trigger object in the beginning of a workflow or as a wait object in the middle of a workflow. If this parameter is selected, succeeding options become available.
-
Evaluate condition immediately- The workflow will not wait. Instead, it will immediately evaluate whether the condition is TRUE or FALSE. Select this parameter if the condition should act as a conditional element which can determine a workflow's path based on whether the result is TRUE or FALSE. For example, a File condition can be used in the middle of a workflow to immediately determine if File A exists inside Folder B. If TRUE, run Task1. If FALSE, run Task2 instead.
The behavioral properties of a newly created condition is always set to wait indefinitely for the specified condition to occur, which means that it will behave as a trigger element if placed in the beginning of a workflow. To modify the behavior, simply make the proper adjustments. For more details, see the table below.
Property | Description | Details |
---|---|---|
Wait for condition | If enabled, waits for occurrence of the monitored condition according to the succeeding parameters (enabled by default). |
|
Evaluate condition immediately | If enabled, the monitored condition is evaluated immediately (disabled by default). | If
enabled, the system does not wait. Instead, it immediately determines
if the monitored condition evaluates to TRUE or FALSE. This option
allows decisions to be made during the course of a workflow. It
can determine the course of a workflow based on results, thus,
allowing the Automate condition to behave as a CONDITIONAL
(decision making) object. For example, using the Window Condition example mentioned above, if this option is enabled, the system does not wait for the existence of an Internet Explorer window. Rather, it will immediately determine if the window already exists on the desktop. If the evaluation results to TRUE, the execution is marked as success and therefore execution follows the path marked by a Success (Green) Arrow. If the evaluation results to FALSE, the execution is marked as failure and execution follows the path marked by a Failure (Red) Arrow. NOTE: This option supports ensuing use of Success and Failure Flow Control
Arrows only. It does not support the use of Result Arrows. |
Examples
The following examples describe how conditions behave in specific circumstances.
CASE 1 - Condition used as a trigger |
---|
DescriptionThis simple workflow uses a File condition as a trigger. The File condition waits for 'File X' to exist in 'Folder Y' and automatically executes 'Task A' when such an event occurs. It will trigger if the condition is true on startup as well.![]() |
Behavior Settings
A condition can be used to trigger the start of a workflow only under certain circumstances:
NOTE: This is the default behavior
properties for newly created conditions.
|
CASE 2 - Trigger after condition is met 3 times. |
---|
DescriptionA Process condition is set as the first
object in a workflow to monitor for the 'Notepad.exe' process
to start a total of 3 times before triggering the execution of
'Task A' and 'Task B' concurrently. It will ignore conditions
that are true on startup. |
Behavior Settings
Comments:A condition can be set to trigger after a particular event has transpired a certain amount of times. This can be performed by selecting its behavior properties to Wait for condition along with Trigger after the condition has been met and select the amount of times the condition should occur before the trigger becomes active. |
CASE 3 - Condition used as a wait element |
---|
DescriptionA Window condition is used in the
middle of a workflow to wait for the Internet Explorer window
to appear before proceeding to Task B. If Internet Explorer does
not appear within 60 seconds from the time the workflow arrived
at this object, a timeout will occur. |
Behavior Settings
Comments:To set a condition to wait for a specific event to transpire at a specific point in a workflow, set the behavior properties to Wait for condition along with Timeout After and enter the desired amount of time for the condition to wait. Execution will proceed if the monitored condition is met within the time specified. If it is not met, a timeout occurs. NOTE: A time out value is not required,
however, omitting this option makes the wait indefinite.
|
CASE 4 - Proceed after condition is met 3 times |
---|
DescriptionA Window condition is used in the
middle of a workflow to wait for the Internet Explorer window
to appear a total of 3 times within 3 minutes. If this occurs,
the condition returns TRUE and therefore follows the Success (green)
arrow to Task B. If Internet Explorer does not appear 3 times
within 3 minutes, the condition returns FALSE and therefore proceeds
to the Failure (red) arrow pointing to task C. |
Behavior Settings
Comments:A condition can be set to delay an active workflow until a particular event has occurred a specific number of times by enabling the option Trigger after the condition has been met and selecting the amount of times the event should occur before the workflow continues. Additionally, a condition can determine the direction of a workflow depending on the outcome as a result of the wait. NOTE:
A time out value is not required,
however, omitting this option makes the wait indefinite.
|
CASE 5 - Condition used as an "If" statement |
---|
DescriptionA File condition is used to evaluate if File A exists in Folder B. If the condition returns TRUE, the workflow proceeds to the Success (green) arrow pointing to Task D. If the condition returns FALSE, the workflow continues to the Failure (red) arrow which points to Task E. ![]() |
Behavior Settings
Comments:A condition can act as an If conditional by settings the behavior properties to Evaluate condition immediately. When this option is selected, the system will not wait, but rather, it will evaluate the specified condition immediately, and return a TRUE or FALSE. |