<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
    <a:init-procedure>
        <batch-apply sourcepath="/parameter">
            <p:switch test="@current_parameter/@_status">
                <p:case value="insert">
                    <a:model-execute model="hls.HLS500.hls_fin_calc_header_id" trace="true"/>
                    <a:model-insert model="prj.PRJ501.prj_quotation_save" trace="true"/>
                    <p:set field="@current_parameter/@from_doc_pk" value="${/parameter/@quotation_id}"/>
                    <a:model-update model="hls.HLS500.hls_fin_calc_quotation_transfer" trace="true"/>
                </p:case>
                <p:case value="update">
                    <a:model-execute model="hls.HLS500.hls_fin_calc_header_id" trace="true"/>
                    <a:model-update model="prj.PRJ501.prj_quotation_save" trace="true"/>
                    <a:model-update model="hls.HLS500.hls_fin_calc_quotation_transfer" trace="true"/>
                </p:case>
                <p:case value="execute">
                    <a:model-update model="prj.PRJ501.prj_quotation_save" trace="true"/>
                    <a:model-update model="hls.HLS500.hls_fin_calc_quotation_transfer" trace="true"/>
                </p:case>
            </p:switch>
        </batch-apply>
    </a:init-procedure>
    <a:service-output output="/parameter"/>
</a:service>