<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">
    <script><![CDATA[
        import com.workfusion.odf.core.Intake;
        import com.workfusion.odf.impl.connector.DummyS3TransactionSupplier;

        Map<String, String> params = new HashMap<>();

        params.put("1", "https://wfinst-307-92-db1.workfusion.com/intake-bucket/exampleForFlatMap.zip");
        params.put("2", "https://wfinst-307-92-db1.workfusion.com/intake-bucket/empty.zip");

        Intake intake = Intake.init(binding).params(params).get();
        def transactions = intake.loadTransactions(DummyS3TransactionSupplier.class);

        result = [];
        transactions.each {
            result << ['transaction_id': it.id];
        }
    ]]></script>

    <export include-original-data="true">
        <multi-column list="${result}" split-results="true">
            <put-to-column-getter name="_sys_transaction_id" property="transaction_id"/>
        </multi-column>
    </export>
</config>
