Data Variables

Applies To: System Center Operations Manager 2007

Values of the data properties collected by a data source are accessed by $Data variables. The available properties and the syntax of $Data variables will be different for each kind of data source, and the syntax will be different for the same property in different usage. This is because all data that is used by a workflow is formatted in XML, and the syntax of the $Data variable is an XPath to a particular value. As different parts of the workflow process the data, it may be reformatted requiring a different XPath to the same value.

The following table lists common ways that $Data variables are used and the general syntax that is used to access each. The following sections provide the details of each kind of data source and the properties available for each. These sections provide additional details on the syntax that is specific to each kind of data.

Use Description Syntax

Criteria expressions

Criteria expressions do not require use of the $Data prefix to the variable or the dollar sign ($) delimiters. The syntax used for the parameter name in an expression will be the XPath to the property. For some data sources this is the name of the property.

Expressions are used to evaluate data to determine whether the data meets certain criteria. This may be inspecting an event to determine whether the data matches a particular source and number. Or, the expression might be comparing a performance value to a threshold. The $Data variable is used to identify the particular property from the data source being evaluated.

Mapping between data types

When you use them for mapping data, the syntax of the $Data variable will be the same as for a criteria expression except with the $Data prefix and the dollar sign ($) delimiters. This will typically have the following syntax:

$Data/<XPath to Property>$

A data source may create data in one type that must be mapped to another type for the next step in a workflow. For example, collection rule may run a script that collects data to be stored as performance data. The data coming from the script would be formatted in a property bag and require mapping to performance data. The mapping would require the $Data variables to refer the values from the script’s property bag.

Alert Descriptions

The syntax for $Data variables in alert descriptions is different for alerts created by rules and alerts created by monitors. This is because an alert from a rule is in direct response to an expression while an alert from a monitor is response to a state change. Each may start with the same data source. However, the data is reformatted by the monitor after the state change.

$Data variables in alert descriptions from rules will typically have the following syntax:

$Data/<XPath to Property>$

$Data variables in alert descriptions from monitors will typically have the following syntax:

$Data/Context/<XPath to Property>$

$Data variables can be used in alert descriptions to provide details of the data that created the alert.