<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
     <bm:operation name="query">
                <bm:query-sql><![CDATA[
                  select t1.division,
                    decode(t1.division, 70, nvl(hma.division_detail, '01'), '') division_detail
                  from con_contract t1, hls_bp_master_agent_division hma
                 where t1.bp_id_agent_level1 = hma.bp_id
                   and t1.division = hma.division
                   and t1.contract_id=${/parameter/@contract_id}
                ]]></bm:query-sql>
            </bm:operation>
        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="change_req_id" dataType="java.lang.Long" input="false" output="true" outputPath="@change_req_id"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                BEGIN
                    cus_con_et_pkg.create_change_req_et(p_contract_id=>${@contract_id},
                                                        p_req_type=>${@req_type},
                                                        p_user_id=>${/session/@user_id},
                                                        p_simulation_flag=>${@simulation_flag},
                                                        p_change_req_id=>${@change_req_id} );
                END;
                ]]>
            </bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
