Documentation Center

IWriteMetadataAndBlobPlugin - BlobExtractConditions

Extracts all condition names and values used in the document and stores them in metadata. When syntactically incorrect conditions are found, it either logs a warning or throws an error. The resulting metadata contains something like e.g. MODEL:330, MODEL:660, GPRS:Y

Plugin Configuration

The following workset fields need to be configured:
Field NameField Level
The name specified in the MetadataField parameter (or 'FISHCONDITIONS' if the parameter is not present)The level specified in the MetadataFieldLevel parameter (or 'lng' if the parameter is not present)
The following parameters can be configured:
ParameterRequiredDefault valueAllowed valuesDescription
ExtractXPathNo//*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@ishconditionXPath expression with the ishcondition attributes to extract.
AllowInvalidNoNoYes, NoIf syntactically incorrect conditions are found and this setting is 'Yes', a warning is logged. If this setting is 'No', an error is thrown
MetadataFieldNoFISHCONDITIONS The metadata field which should be set
MetadataFieldLevelNolnglogical, version, lngThe metadata field level
<plugin name="ISHSYSCONDITIONSTOMETADATA" handler="BlobExtractConditions" 
        ishcondition="CurrentAction in ('Create', 'Update', 'Checkin') and (EDT='EDTXML')">
          <description>Find conditioname/value pairs in the document, checks them and stores them in metadata</description>
          <workingset>
            <ishfields>
              <ishfield name="FISHCONDITIONS" level="lng"/>
            </ishfields>
          </workingset>
          <initialize>
            <parameters>
              <parameter name="ExtractXPath">
                //*[@ishcondition][not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@ishcondition</parameter>
              <parameter name="AllowInvalid">No</parameter>
              <parameter name="MetadataField">FISHCONDITIONS</parameter>
              <parameter name="MetadataFieldLevel">lng</parameter>
            </parameters>
          </initialize>
        </plugin>

Plugin flow

The plugin will first determine all ishcondition attributes, then syntactically check them, and then extract the condition name + value parts.