Share via


Correlation Template Design Guidelines

The guidelines for developing correlation templates consist of a set of qualifiers that can aid tools supporting creation of correlation template instances.

For more information about support and installation of this component on a specific operating system, see Operating System Availability of WMI Components.

The following table lists class qualifiers.

Class qualifier Description
description Description string.

 

The following table lists property qualifiers.

Property qualifier Description
crln_data_query Valid WQL data query.
crln_update_query Valid UQL query.
crln_event_query Valid WQL event query.
crln_namespace Valid namespace.
crln_classname Valid class name.
crln_condition Valid WQL expression for constraints.
crln_domain Valid WQL expression for restricting the domain of an input.
crln_propname Valid property name.
crln_delay_tol Interval expressed in floating-point seconds.
crln_interval Interval expressed in floating-point seconds.

 

All property-level qualifiers can optionally contain a grouping name as a value. This value permits different aspects of a common entity to be related. For instance, a class name and a property name may be related using a grouping identifier.

Domain and Condition Expressions

A domain expression is one that restricts the domain of the template input. For example, the domain expression Name = 'Abc' tells the template to only consider instances having a Scenario property of "Abc".

A condition expression identifies a particular condition of the template input that is of interest to the template. For example, a template which performs actions on transition into a "True" and "False" state. The condition describing the True state is specified by a condition expression. The template can automatically determine the False state by being set to NOT (condition_expression).

The distinction between a domain expression and a condition expression allows efficient filtering by the correlation template.

The following example shows an expression that is passed to the template.

(Name = 'Abc' OR Name = 'Def') AND Prop1 > 50

The implementation of the template is not only interested in when Prop1 is above 50, but also when it goes below 50 so that it can perform the action that corresponds to the FALSE state.

The following example shows how to perform the action that corresponds to the FALSE state by using an event filter expression.

SELECT * FROM __InstanceModificationEvent 
WHERE TargetInstance ISA 'MyClass'
AND NOT (%PropScopeExpr%)

However, this would result in updating consumers subscribed to this event being indicated for instances that do not have the name "Abc" or "Def". The correct way to issue this query is to split the domain and condition expressions to form a filter.

The following example shows how to split the domain and condition expressions to form a filter.

SELECT * FROM __InstanceModificationEvent
WHERE TargetInstance ISA 'MyClass'
AND %ScopeExpr%
AND NOT (%PropExpr%)