System.ExpressionFilter

Applies To: Operations Manager 2007 R2

The System.ExpressionFilter condition detection module is a filtering module that takes any input data type and outputs the same data type. There are no changes to the data item flowing through a module of this type. The module either allows the data item through or stops the data item based on the expression specified as configuration.

Usage

Use this module within a workflow to filter any type of data type.

Type Definition

<ConditionDetectionModuleType ID="System.ExpressionFilter" Accessibility="Public" Stateful="false" PassThrough="true" Batching="true">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="Expression" type="ExpressionType"/>
  </Configuration>
  <ModuleImplementation Isolation="Any">
    <Native>
      <ClassID>C6410789-C1BB-4AF1-B818-D01A5367781D</ClassID>
    </Native>
  </ModuleImplementation>
  <OutputType>System.BaseData</OutputType>
  <InputTypes>
    <InputType>System.BaseData</InputType>
  </InputTypes>
</ConditionDetectionModuleType>

Parameters

The System.ExpressionFilter module supports the following configuration parameters:

Parameter Type Overrideable Description

Expression

ExpressionType

False

Required parameter. Defines an expression that evaluates to true or false.

If the expression defined in the Expression parameter evaluates to true, the workflow will continue and the data will be passed on to the subsequent module in the workflow. If false, then the data will not be passed to the next module and the workflow will end. For more information on the ExpressionType data type, see ExpressionType.

Composition

The System.ExpressionFilter module is a native module.

None.

External Module References

The System.ExpressionFilter module is a member of the following public modules:

Module Type Library Usage

Microsoft.Windows.WmiProvider.FilteredEventProvider

Microsoft.Windows.Library

Queries a WMI namespace at a scheduled frequency and returns the filtered results as System.Event.Data type data.

Sample

The following XML sample shows how you can use the System.ExpressionFilter module in a DataSourceModuleType element definition. The expression is passed in through the configuration parameter of the data source module type. If the expression equates to true, then the data is passed on to the event mapper module and is store in the Operations Manager database.

<DataSourceModuleType ID="Microsoft.Windows.WmiProvider.FilteredEventProvider" Accessibility="Public">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="NameSpace" type="xsd:string" />
    <xsd:element name="Query" type="xsd:string" />
    <xsd:element name="Frequency" type="xsd:integer" />
    <xsd:element name="Expression" type="ExpressionType" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource TypeID="Microsoft.Windows.WmiProvider" ID="DataSource">
          <NameSpace>$Config/NameSpace$</NameSpace>
          <Query>$Config/Query$</Query>
          <Frequency>$Config/Frequency$</Frequency>
        </DataSource>
        <ConditionDetection TypeID="System!System.ExpressionFilter" ID="Filter">
          <Expression>$Config/Expression$</Expression>
        </ConditionDetection>
        <ConditionDetection TypeID="System!System.Event.GenericDataMapper" ID="Mapper">
          <EventOriginId>$Target/Id$</EventOriginId>
          <PublisherId>$MPElement$</PublisherId>
          <PublisherName>WmiProvider</PublisherName>
          <Channel>WmiProvider</Channel>
          <LoggingComputer />
          <EventNumber>0</EventNumber>
          <EventCategory>3</EventCategory>
          <EventLevel>0</EventLevel>
          <UserName />
          <Params />
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper">
          <Node ID="Filter">
            <Node ID="DataSource" />
          </Node>
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Event.Data</OutputType>
</DataSourceModuleType>

Information

   

Module Type

ConditionDetectionModuleType

Input Type

System.BaseData

Output Type

System.Event.Data

Implementation

Native

Library

System.Library