Conditions

A condition determines whether a Task, Module or Run Book Job should be executed, skipped or failed. A condition determines to which settings a Task, Module or Run Book Job in a Job must comply before it is executed. A condition contains one or more expressions that determine whether the condition can be satisfied and defines what action should be taken based on this.

  • Task conditions determine whether a Task in a Module should be executed, skipped or failed. Task conditions can be set when configuring Tasks and Modules.
  • Module conditions determine whether a Module in a Project should be executed, skipped or failed. Module conditions can be set when configuring Projects.
  • Job conditions determine whether a Job in a Run Book should be executed, skipped or failed. Job conditions can be set when configuring Run Books. When configuring Job conditions, only the expression types Date Time, Parameter and Status of Previously Executed Job are available.

Example

For example, a Module could contain the following:

  • Task Export Exchange Mailbox
  • Task Disable Exchange Mailbox
  • Task Send E-mail

If the Task Disable Exchange Mailbox fails, the administrator should receive a warning by e-mail. To achieve this, you can set the following condition on the Conditions tab of the Task Send E-mail:

  • Expression: Status of previously executed Task = Failed.
  • If this condition is FALSE then: skip this Task
  • If this condition is TRUE then: execute this Task

Configuration

Expressions

In the Management Portal, condition expressions can be based on the following operands:

  • Date Time
  • Parameter
  • Status of previously executed Task/Job
  • Computer Function
  • Environment Variable
  • File/Folder Operations
  • File Version
  • File Exists
  • Folder Exists
  • Fully Qualified Domain Name
  • Operating System: Bit Version, Suite, Type, Version
  • Processor Architecture
  • Registry Setting

When configuring a condition, you can use several operators. See Pattern matching: operators and wildcards for an overview.

Validation

When you select the validation rule (all expressions or at least one), you can validate the individual expressions and show the condition results (True or False).

  • Validation is done on the current machine at configuration.
  • Validation is done on the target Agent at run-time.

If condition is True/False then

You can configure the action that needs to be performed when the condition results in True or False:

  • Execute this Job
  • Skip this Job
  • Skip this Job and all remaining Jobs in this Run Book
  • Execute this Job, but skip all remaining Jobs in this Run Book
  • Allow to set a parameter value based on the results of the condition. For example, if you configure a Change Service Parameters Task to restart a certain service on a number of Agents, this service can have a different name, depending on the operating system of the Agent. By letting the condition result set the correct parameter value (for example, the Windows Firewall services SharedAccess or mpssvc), the Task will restart the correct service on each Agent.

Execution

When Projects or Run Books are executed, all conditions will be evaluated, including Task and Module conditions. The Task details of a Job show information about (satisfied) conditions as they existed during execution of the Job.

The use of global Variables in Run Book parameters, Run Book conditions and Run Book evaluators is not supported.