Compartir a través de


ConditionDetection (ConditionDetectionModuleType)

Applies To: Operations Manager 2007 R2, System Center Operations Manager 2007

Represents an implementation of a condition detection module type definition.

Schema Hierarchy

ManagementPack
  TypeDefinitions
    ModuleTypes
      ConditionDetectionModuleType
        ModuleImplementation (ConditionDetectionModuleType)
          Composite (ConditionDetectionModuleType)
            MemberModules (ConditionDetectionModuleType)
              ConditionDetection (ConditionDetectionModuleType)

Syntax

<ConditionDetection ID=”ModuleID” Comment=”Comment” TypeID=”ModuleTypeID”>
Custom Schema Defined Parameters
</ConditionDetection>

Attributes and Elements

The following sections describe attributes, child elements, and the 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 UniqueElementID.

The ID string must contain the following characteristics:

  • The length is less than 255 characters.

  • The ID begins with a letter (a-z) or a number (0-9).

  • The ID contains only letters, numbers, the period character (.), or the underscore (_) character.

  • The ID is unique across all elements within the scope of the ConditionDetection module’s containing workflow.

  • The ID is case-sensitive.

Child Elements

The child element of the ConditionDetection module is defined by the Configuration (ConditionDetectionModuleType) schema of its base type as referenced in the TypeID attribute.

Parent Elements

Element Description

MemberModules (ConditionDetectionModuleType)

Contains all of the modules that are used in the linear workflow of a module type definition.

Remarks

A condition detection module takes any number of input streams and outputs data based on some kind of filtering of data. Condition detection modules are also used to convert one data type to another data type in a workflow. Because condition detection modules can take multiple data input streams, they are 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 condition detection 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 condition detection module type is preceded in a workflow by an implementation of a DataSourceModuleType event module. Condition detection modules are also often preceded by ProbeAction (ProbeActionModuleType) modules that provide data for filtering purposes.

Because a filtering condition detection module is not itself a data source, it always returns the same OutputType 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 condition detection mapping module.

A condition detection module’s base type must always be a descendant of a ConditionDetectionModuleType type.

Example

The following sample illustrates how a condition detection module can be used to filter input data. This particular sample allows the implementation to provide a value that is used to filter data by software feature. The ProbeAction module named WmiProbe returns System.PropertyBagData from a WMI query. The condition detection module filters the returned property bag data on the value in the SoftwareFeatureName configuration parameter. The output type of the condition detection module is the same as the output data of its preceding probe module, WmiProbe. The ProbeActionModuleType will, if the filtering returns any results, return 3ee9ad95-04b1-4bd8-8797-396d39839a38 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 (ConditionDetectionModuleType)