<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="err_count" dataType="java.lang.Long" output="true" outputPath="err_count"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_import_custom_pkg.import_item_interface(p_batch_id =>${@batch_id}, 
                    										   p_header_id =>${@batch_id}, 
                    										   p_document_id =>${@document_id},
                    										   p_user_id =>${/session/@user_id}, 
                    										   p_company_id =>${/session/@company_id}, 
                    										   p_type =>${@type}, 
                    										   p_err_count =>${@err_count});
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
        	select t.log_id,t.line_number,t.log_msg,t.log_date from HN_IMPORT_ITEM_LOG t where t.header_id = ${@header_id}
        	]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="log_id"/>
        <bm:field name="line_number"/>
        <bm:field name="log_msg"/>
        <bm:field name="log_date" databaseType="DATE" datatype="java.util.Date"/>
    </bm:fields>
</bm:model>
