BuildForge Help

resultsblock

The <resultsblock> element defines how the system should process the results of the command lines executed from the related <execute> element. The <resultsblock> element is only used within a <command> element. The <resultblock> element can be nested to partition results.

The <resultsblock> element can have optional beginpattern and endpattern attributes that use Perl regular expressions to define a range of output lines to process. You can use this to have some portions of the output processed by different <resultsblock> elements. The following pseudocode shows the structure of a <resultsblock>.
<resultsblock startpattern="" endpattern="" >
        <match>
        <bom>
         <field/>
        </bom>
        <adduser/>
        <setenv/>
        <run/> (The <run> element can be used to run commands within other commands)
        </match>
        <setenv/>
      </resultsblock>
The following example shows how the <resultsblock>, <match>, and <bom> elements work together:
<resultsblock 
beginpattern="^Change (\d+) by (.*?)@(.*?) on (.*?) (.*?)$" 
endpattern="^Differences ...$">
        <match pattern="(?=^(?:(?!Differences ...).)*$).?">
        <bom category="Detail" section="descriptions">
        <field name="Description" text="$_"/>
        </bom>
        </match>
     </resultsblock>