Mapping delle classi con modulo condizione e rilevamento filtro

Microsoft.JEE.ClassMapperWithFilter.ConditionDetectionModuleType (ConditionDetectionModuleType)

Modulo di mapping che filtra i dati di base e li converte in dati di individuazione.

Element properties:

TypeConditionDetectionModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
OutputTypeSystem.Discovery.Data

Member Modules:

ID Module Type TypeId RunAs 
ClassMapper ConditionDetection System.Discovery.ClassSnapshotDataMapper Default
ErrorReceived ConditionDetection System.ExpressionFilter Default
Filter ConditionDetection System.ExpressionFilter Default

Source Code:

<ConditionDetectionModuleType ID="Microsoft.JEE.ClassMapperWithFilter.ConditionDetectionModuleType" Accessibility="Public" PassThrough="false" Batching="false" Stateful="false">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
<SchemaType>System!System.Discovery.MapperSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="Filter" type="xsd:string"/>
<xsd:element name="ClassId" type="xsd:string"/>
<xsd:element name="InstanceSettings" type="SettingsType"/>
</Configuration>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<!-- If the HTTP call resulted in an error, the workflow -->
<!-- should terminate. This is necessary because -->
<!-- otherwise an error per rule is generated in the -->
<!-- event log. This condition/detection will look for an -->
<!-- error and terminate the flow. -->
<ConditionDetection ID="ErrorReceived" TypeID="System!System.ExpressionFilter">
<Expression>
<Not>
<Expression>
<Or>
<Expression>
<Exists>
<ValueExpression>
<XPathQuery Type="String">/DataItem/Property[@Name="/ERROR/HTTP"]</XPathQuery>
</ValueExpression>
</Exists>
</Expression>
<Expression>
<Exists>
<ValueExpression>
<XPathQuery Type="String">/DataItem/Property[@Name="/ERROR/XML"]</XPathQuery>
</ValueExpression>
</Exists>
</Expression>
</Or>
</Expression>
</Not>
</Expression>
</ConditionDetection>
<!-- This filtering mechanism should trigger if the filter is defined. -->
<!-- If the filter is defined, then this will pass thru if the filter -->
<!-- is found as a key in the existing property bag. -->
<!-- If the filter is not defined, it will pass thru. -->
<ConditionDetection ID="Filter" TypeID="System!System.ExpressionFilter">
<Expression>
<Exists>
<ValueExpression>
<XPathQuery Type="String">/DataItem/Property[@Name="$Config/Filter$"]</XPathQuery>
</ValueExpression>
</Exists>
</Expression>
</ConditionDetection>
<ConditionDetection ID="ClassMapper" TypeID="System!System.Discovery.ClassSnapshotDataMapper">
<ClassId>$Config/ClassId$</ClassId>
<InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
</ConditionDetection>
</MemberModules>
<Composition>
<Node ID="ClassMapper">
<Node ID="Filter">
<Node ID="ErrorReceived"/>
</Node>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
<InputTypes>
<InputType>System!System.BaseData</InputType>
</InputTypes>
</ConditionDetectionModuleType>