System.LogicalSet.ExpressionFilter

The System.LogicalSet.ExpressionFilter condition detection module type is a filtering module that takes a set of data of 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

This module is used to evaluate a set of data items with a single condition detection module. Condition Detection modules usually run for each data item output from the data source module. The System.LogicalSet.ExpressionFilter evaluates the data as a set, and can be configured to pass or block the workflow depending on whether some all, some, or none of the instances match the criteria.

Type Definition

<ConditionDetectionModuleType ID="System.LogicalSet.ExpressionFilter" Accessibility="Public" Batching="true" Stateful="false" PassThrough="true">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="Expression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="EmptySet" type="EmptySetValueType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="SetEvaluation" type="SetEvaluationValueType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="EmptySet" Selector="$Config/EmptySet$" ParameterType="string" />
    <OverrideableParameter ID="SetEvaluation" Selector="$Config/SetEvaluation$" ParameterType="string" />
  </OverrideableParameters>
  <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.LogicalSet.ExpressionFilter module supports the following configuration parameters.

Parameter Type Description

Expression

ExpressionType

Required parameter. Defines an expression that evaluates to true or false for each of the incoming data items.

EmptySet

EmptySetValueType

Determines what the module should do with sets that contain no data. Only two values are possible: Passthrough, which passes the set on to the next module in the workflow, and Block, which stops processing of the workflow.

SetEvaluation

SetEvaluationValueType

Specifies how to evaluate the data set against the condition. Only two values are possible: All, which passes the condition detection only if all items in the data set meet the criteria, or Any, which passes each of those data items that meet the criteria.

Composition

The System.LogicalSet.ExpressionFilter module is a native module.

Module Type Usage

System.ExpressionFilter

Passes or halts a workflow based on the value of a specified expression.

External Module References

None.

Sample

The following XML defines a simple threshold style monitor type that determines if a performance counter with multiple instances is below the configured threshold. The AboveThresholdDetection condition detection module checks to see if all passed in data items are above the threshold; when this is true, the state of the monitor will be set to AboveThreshold. The BelowThresholdDetection condition detection module checks to see if any of the passed in data items are below the threshold, and if this is true the state of the monitor will be set to BelowThreshold. Note that these two conditions are mutually exclusive.

<UnitMonitorType ID="CustomSimpleThreshold.ErrorOnAnyBelowThreshold" Accessibility="Public">
  <MonitorTypeStates>
    <MonitorTypeState ID="AboveThreshold" NoDetection="false" />
    <MonitorTypeState ID="BelowThreshold" NoDetection="false" />
  </MonitorTypeStates>
  <Configuration>
    <xsd:element minOccurs="1" name="ComputerName" type="xsd:string" />
    <xsd:element minOccurs="1" name="CounterName" type="xsd:string" />
    <xsd:element minOccurs="1" name="ObjectName" type="xsd:string" />
    <xsd:element minOccurs="1" name="InstanceName" type="xsd:string" />
    <xsd:element minOccurs="1" name="AllInstances" type="xsd:boolean" />
    <xsd:element minOccurs="1" name="Frequency" type="xsd:unsignedInt" />
    <xsd:element minOccurs="1" name="Threshold" type="xsd:double" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
    <OverrideableParameter ID="Threshold" Selector="$Config/Threshold$" ParameterType="double" />
  </OverrideableParameters>
  <MonitorImplementation>
    <MemberModules>
      <DataSource ID="DS_PerfData" TypeID="Performance!System.Performance.DataProvider">
        <ComputerName>$Config/ComputerName$</ComputerName>
        <CounterName>$Config/CounterName$</CounterName>
        <ObjectName>$Config/ObjectName$</ObjectName>
        <InstanceName>$Config/InstanceName$</InstanceName>
        <AllInstances>$Config/AllInstances$</AllInstances>
        <Frequency>$Config/Frequency$</Frequency>
      </DataSource>
      <ConditionDetection ID="AboveThresholdDetection" TypeID="System!System.LogicalSet.ExpressionFilter">
        <Expression>
          <SimpleExpression>
            <ValueExpression>
              <XPathQuery Type="Double">Value</XPathQuery>
            </ValueExpression>
            <Operator>Greater</Operator>
            <ValueExpression>
              <Value Type="Double">$Config/Threshold$</Value>
            </ValueExpression>
          </SimpleExpression>
        </Expression>
        <EmptySet>Passthrough</EmptySet>
        <SetEvaluation>All</SetEvaluation>
      </ConditionDetection>
      <ConditionDetection ID="BelowThresholdDetection" TypeID="System!System.LogicalSet.ExpressionFilter">
        <Expression>
          <SimpleExpression>
            <ValueExpression>
              <XPathQuery Type="Double">Value</XPathQuery>
            </ValueExpression>
            <Operator>LessEqual</Operator>
            <ValueExpression>
              <Value Type="Double">$Config/Threshold$</Value>
            </ValueExpression>
          </SimpleExpression>
        </Expression>
        <EmptySet>Block</EmptySet>
        <SetEvaluation>Any</SetEvaluation>
      </ConditionDetection>
    </MemberModules>
    <RegularDetections>
      <RegularDetection MonitorTypeStateID="BelowThreshold">
        <Node ID="BelowThresholdDetection">
          <Node ID="DS_PerfData" />
        </Node>
      </RegularDetection>
      <RegularDetection MonitorTypeStateID="AboveThreshold">
        <Node ID="AboveThresholdDetection">
          <Node ID="DS_PerfData" />
        </Node>
      </RegularDetection>
    </RegularDetections>
  </MonitorImplementation>
</UnitMonitorType>

Information

   

Module Type

ConditionDetectionModuleType

Input Type

System.BaseData

Output Type

System.BaseData

Implementation

Native

Library

System.Library