WMI Condition

See Also

Setting the WMI Condition, About Conditions, All Available Conditions, Using AMTrigger, Using AMCondition

Description

Starts a task when a WQL (WMI Query Language) query executed on the agent machine returns true or more than 0 rows. Queries built using WQL are used to manage and control the WMI Service.   

WMI (Windows Management Instrumentation) is a technology built into Windows operating systems that provide direct access to managed resources on a system and allows components and devices in enterprise environments (i.e. hard disks, network/video adapters, BIOS, CPU and Windows components) to be centrally administered and controlled. WMI can be used to obtain information about such devices or to make configuration changes to them.

Practical Usage

Normally used by Network Managers or Systems Administrators to monitor for common issues to occur on various system and network components/devices and execute a task to resolve such problems in case they occur.

Parameters

General Tab

WQL

Specifies the WMI query that should be executed. An example WQL is select IDProcess from Win32_PerfRawData_PerfProc_Process where name='iexplore'

The above query will monitor for the process iexplore to start.

Namespace

Specifies the WMI namespace to execute the query under (i.e. root\CIMV2)

 

Use local computer

Enable this option to monitor for queries on the local machine.

 

Use remote computer

Enable this option to monitor for queries on a remote machine. If Use remote computer is enabled, the computer name, IP address or host name of the remote machine must be entered in the provided text-box.

 

Use specified user

Enable this option if a specified username/password is required to connect to an Agent. If Use specified user is enabled, a valid username and password must be entered in the provided Username and Password text-boxes.

 

Polling interval

Specifies how often this trigger monitors for the resource value. The polling interval is the maximum amount of elapsed time (in seconds) before each status check. The default value is 1 second.

 

Behavior Tab

All available Conditions contain Behavior properties that dictate how it should handle a monitored event or condition. These properties determine whether the Condition should act as a trigger, a wait object or conditional (or decision making) object. By default, new Conditions are set to wait for the specified event/condition indefinitely, allowing it to act as a trigger object. For more details, see Condition Behavior.

AMTrigger Parameters

When this trigger is activated, it automatically passes the "AMTrigger" object to the task. AMTrigger can be used within a task to determine whether or not the task was started by a trigger, which trigger started the task, when the trigger was activated and other trigger related properties. For more details, see Using AMTrigger.

Common AMTrigger Fields

Every instance of AMTrigger populates a list of common fields which are described in the table below.

Name

Data Type

Return Value

AMTrigger.Trigger

String

Returns the name of the event or condition that triggered the task. Each event or condition contains a unique name. For this trigger, the value is always AMWINDOWTRIGGER.

AMTrigger.TaskName

String

Returns the name of the managed task that the trigger was attached to. Useful to determine the responsible task when two managed tasks point to the same AML file.

AMTrigger.TriggerredDateTime

String

Returns the date and time when the trigger occurred.

AMTrigger.TriggeredOn

String

Returns the machine name where the trigger occurred.

AMTrigger.WasLocked

Boolean

If the workstation was locked when the trigger occurred, the value returned is 1. Otherwise, it will be 0.

AMTrigger.WasLoggedOff

Boolean

If the workstation was logged off when the trigger occurred, the value returned is 1. Otherwise, it will be 0.

AMTrigger.AML

String

Returns a verbose set of information about the triggered event or condition in AML (AutoMate Markup Language) format.

 

Specific AMTrigger Fields

The AMTrigger fields listed in the table below are specific only to the WMI trigger.

Name

Data Type

Return Value

AMTrigger.Result

String

Specifies the results returned by the Agent.

AMCondition Parameters

When this condition is used in the middle of a workflow (as opposed to triggering condition) it automatically passes the AMCondition object to the task.

Common AMCondition Fields

Each condition contains its own set of unique AMCondition values. Therefore, the total number of fields that AMConditon creates during runtime and what they are called depend largely on the condition that was activated. However, every instance of AMCondition is populated with the following general fields:

Name

Data Type

Return Value

AMCondition.Agent

String

Returns the name of the agent where the condition activated.

AMCondition.DateTime

String

Returns the date and time of when the condition occurred.

AMCondition.Name
 

String

Returns the name of the activated condition. Each condition contains a unique name. For example, if the File condition was initiated, the value returned would be . See the help topic for each condition to determine that object's unique name.

AMCondition.Result
 

String

Returns the result of the activated condition (True or False).

AMCondition.WasLocked

Boolean

If the workstation was locked when the condition occurred, the value returned is 1. Otherwise, it will be 0.

AMCondition.WasLoggedOff

Boolean

If the workstation was logged off when the condition occurred, the value returned is 1. Otherwise, it will be 0.

AMCondition.AML

String

Returns verbose data about the activated condition in AutoMate Markup Language (AML) format.

 

Exclusive AMCondition Fields

The AMCondition fields described in the table below are specific only to the WMI condition.

 

Name

Data Type

Return Value

AMCondition.Result

Text

Returns the result of the WQL Query that caused the condition to activate.

 

NOTE: A full list of AMCondition and AMTrigger objects exclusive to each Event/Condition can be viewed from the Expression Builder by expanding the Objects folder and selecting the desired object from either the Triggers or Conditions folder .

See Also

About Events & Conditions

All Available Events & Conditions

Condition_Behavior