<?xml version="1.0" encoding="ISO-8859-1" ?>
<binding>
    <bind action="begin" type="download">
        <url value="{livesearch.download}"/>
        <query name="task" valueRef="@task" />
        <query name="user" valueRef="@user"/>
        <compression type="zip" />
        <download port="spectra" type="folder">
            <query name="resource" value="spectra"/>
        </download>
        <download port="flowParams" type="file">
            <query name="resource" value="params"/>
        </download>
    </bind>


    <bind action="extract_firstline" tool="extract_firstline">
        <inputAsRequirement port="spectra"             requirement="spectra"/>
        <inputAsRequirement port="flowParams"       requirement="flowParams"/>
        <productionToOutput port="result"           production="result"/>
    </bind>
    
    <bind action="extract_param_line" tool="extract_param_line">
        <inputAsRequirement port="spectra"             requirement="spectra"/>
        <inputAsRequirement port="flowParams"       requirement="flowParams"/>
        <productionToOutput port="result_param"           production="result"/>
    </bind>

    <bind action="end" type="upload">
        <url value="{livesearch.upload}"/>
        <query name="task" valueRef="@task"/>
        <contentQuery name="content"/>
        <compression type="zip"/>
        <upload port="result" type="file">
            <query name="resource" value="result"/>
        </upload>
        <upload port="result_param" type="file">
            <query name="resource" value="result_param"/>
        </upload>
    </bind>
</binding>
