<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">

    <required name="report_weblink"/>
<!--
Mandatory parameters:
'report_weblink' - web URL that needs to be printed to PDF

Optional parameters are:

's3_bucket' - S3 bucket where printed PDF will be uploaded
Key stored in com.workfusion.odf.impl.converter.html2pdf.RpaPdfReportGenerator.S3_BUCKET_KEY

's3_folder' - S3 folder where printed PDF will be uploaded
Key stored in com.workfusion.odf.impl.converter.html2pdf.RpaPdfReportGenerator.S3_FOLDER_KEY
-->

    <robotics-flow>
        <robot driver="universal" close-on-completion="true">
            <script><![CDATA[
                import com.workfusion.odf.core.Intake

                def intake = Intake.init(binding).get();
                pdfReportLink = intake.generatePdfReport(report_weblink.toString());
                
                ]]></script>
        </robot>
    </robotics-flow>

    <export include-original-data="true">
        <single-column name="report_pdf_link" value="${pdfReportLink}"/>
    </export>
</config>
