<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: nyl  
    $Date: 2013-5-6 下午3:04:46  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features">
    <bm:operations>
        <bm:operation name="insert">
            <bm:parameters>
                <bm:parameter name="protocol_number" output="true" outputPath="/parameter/@protocol_number"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
        		begin
        		
				  hls_bill99_request_pkg.get_protocol_number(p_contract_id     =>${@contract_id},
                                                             p_protocol_number =>${@protocol_number});
   
				end;
        	]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:parameters>
                <bm:parameter name="flag" output="true" outputPath="/parameter/@flag"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
        		begin
        		
				  hls_bill99_request_pkg.nc_protocol_parse_xml(p_response_xml  =>${@response_xml},
		                              p_function_name =>${@function_name},
		                              p_contract_id   =>${@contract_id},
                                      p_protocol_number =>${@protocol_number},
		                              p_request_id   =>${@request_id},
		                              p_user_id      =>-1);

				end;
        	]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="flag" output="true" outputPath="/parameter/@flag"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
        		begin
        		
				  hls_bill99_request_pkg.check_protocol_parse_xml(p_response_xml  =>${@response_xml},
									                              p_function_name =>${@function_name},
									                              p_contract_id   =>${@contract_id},
							                                      p_protocol_number =>${@protocol_number},
									                              p_request_id   =>${@request_id},
									                              p_user_id      =>-1);

				end;
        	]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
