<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:ns1="leaf.application.action" xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
    <a:init-procedure>
        <s:server-script><![CDATA[
            function set_dynamic_base_table() {
                if ($ctx.parameter.ln_table_flag == 'Y') {
                    $ctx.parameter.dynamic_base_table = 'HLS_FIN_CALCULATOR_LN';
                    return;
                }
                if ($ctx.parameter.ln_formula_table_flag == 'Y') {
                    $ctx.parameter.dynamic_base_table = 'HLS_FIN_CALCULATOR_LN_FORMULA';
                    return;
                }
                if ($ctx.parameter.hd_formula_table_flag == 'Y') {
                    $ctx.parameter.dynamic_base_table = 'HLS_FIN_CALCULATOR_HD_FORMULA';
                    return;
                }
            }
            set_dynamic_base_table();
        ]]></s:server-script>
        <a:model-query autoCount="true" fetchAll="true" model="hls.HLS500N.hls_fin_calculator_common" rootPath="result"/>
    </a:init-procedure>
    <a:service-output output="/model/result"/>
</a:service>
