<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-8-2 下午2:48:24  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="ZJ_WFL_ADD_APPROVAL_LIST">
    <bm:fields>
        <bm:field name="rcpt_record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RCPT_RECORD_ID" prompt="ZJ_WFL_ADD_APPROVAL_LIST.RCPT_RECORD_ID"/>
        <bm:field name="seq_number" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQ_NUMBER" prompt="ZJ_WFL_ADD_APPROVAL_LIST.SEQ_NUMBER"/>
        <bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="ZJ_WFL_ADD_APPROVAL_LIST.USER_ID"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
    			begin
    				ZJ_WFL_CORE_PKG.workflow_add_approver(p_rcpt_record_id      => ${@rcpt_record_id},
						                                  p_add_method_priority => ${@add_method_priority},
						                                  p_comment             => ${@comment},
						                                  p_user_id             => ${/session/@user_id});
    			end;
    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="rcpt_record_id"/>
        <bm:pk-field name="user_id"/>
    </bm:primary-key>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="审批人重复"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
