ConditionDetection (ProbeActionModuleType)
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
Represents an implementation of a condition detection module type definition.
Schema Hierarchy
ManagementPack
TypeDefinitions
ModuleTypes
ProbeActionModuleType
ModuleImplementation (ProbeActionModuleType)
Composite (ProbeActionModuleType)t
MemberModules (ProbeActionModuleType)
ConditionDetection
Syntax
<ConditionDetection ID=”ModuleID” Comment=”Comment” TypeID=”ModuleTypeID”>
Custom Schema Defined Parameters
</ConditionDetection>
Attributes and Elements
The following sections describe attributes, child elements, and parent element of the ConditionDetection element.
Attributes
Attribute | Description |
---|---|
ID |
Required attribute. Represents the identity of the element. |
Comment |
Optional attribute. Represents commentary by the management pack author. |
TypeID |
Required attribute. Represents the ConditionDetection module type definition from which this ConditionDetection module inherits its configuration schema. |
ID Attribute Values
Value | Description |
---|---|
The format for the ID attribute should be |
The ID string must contain the following characteristics:
|
Child Elements
The child element of the ConditionDetection module is defined by the Configuration (ProbeActionModuleType) schema of its base type as referenced in the TypeID attribute.
Parent Elements
Element | Description |
---|---|
Contains all modules used in the linear workflow of a module type definition. |
Remarks
A ConditionDetection module takes any number of input streams and outputs data based on some kind of filtering of data. ConditionDetection modules are also used to convert one data type to another data type in a workflow. Futhermore, because a ConditionDetection module can take multiple data input streams, it is also used to correlate or consolidate data within a workflow. The data types of its input and output data are defined in its InputTypes and OutputType (ProbeActionModuleType) elements, respectively.
A ConditionDetection module type never alters system state. If you want your module to affect system state, you must instead use or implement a WriteAction (WriteActionModuleType) module.
Typically, to filter for specific events, a ConditionDetection module type is preceded in a workflow by an implementation of a DataSourceModuleType event module. ConditionDetection modules are also often preceded by ProbeAction (ProbeActionModuleType) modules that provide data for filtering purposes.
Because a filtering ConditionDetection module is not itself a data source, it always returns the same OutputType (ProbeActionModuleType) element of the preceding module in the workflow, whether that be a DataSource or ProbeAction module. If you want to change the format of the output data, you must use some kind of ConditionDetection mapping module.
A ConditionDetection module’s base type must always be a descendant of a ConditionDetectionModuleType type.
Example
The following sample illustrates how a ConditionDetection module can be used to filter input data. This particular sample allows the implementation to provide a value used to filter data by software feature. The ProbeAction module named WmiProbe
returns System.PropertyBagData from a WMI query. The ConditionDetection module filters the returned property bag data on the value in the SoftwareFeatureName
configuration parameter. The output type of the ConditionDetection module is the same as the output data of its preceding probe module, WmiProbe
. If the filtering returns any results, the ProbeActionModuleType element will return System.PropertyBagData as output. If the filter returns zero results, the workflow ends and nothing is returned.
<ProbeActionModuleType ID="Microsoft.Windows.SoftwareFeatureProbe" Accessibility="Public">
<Configuration>
<xsd:element name="ComputerName" type="xsd:string" />
<xsd:element name="SoftwareFeatureName" type="xsd:string" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="ComputerName" ParameterType="string" Selector="$Config/ComputerName$" />
<OverrideableParameter ID="SoftwareFeatureName" ParameterType="string" Selector="$Config/SoftwareFeatureName$" />
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<ProbeAction ID="WmiProbe" TypeID="Microsoft.Windows.WmiTriggerProbe">
<NameSpace>\\$Config/ComputerName$\Root\CIMv2</NameSpace>
<Query>SELECT * FROM Win32_SoftwareFeature</Query>
</ProbeAction>
<ConditionDetection ID="FilterOnFeatureName" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Name']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/SoftwareFeatureName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<Composition>
<Node ID="FilterOnFeatureName">
<Node ID="WmiProbe" />
</Node>
</Composition>
</Composite>
</ModuleImplementation>
See Also
Reference
ConditionDetectionModuleType
MemberModules (ProbeActionModuleType)