<?xml version="1.0" encoding="UTF-8"?>
<bm:model   xmlns:e="leaf.service.exception" xmlns:db="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="p" baseTable="ZJ_WFL_WORKFLOW_PROCEDURE" defaultOrderBy="procedure_id desc">
    <bm:fields>
        <bm:field name="procedure_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROCEDURE_ID" prompt="ZJ_WFL_WORKFLOW_PROCEDURE.PROCEDURE_ID"/>
        <bm:field name="procedure_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROCEDURE_CODE" prompt="ZJ_WFL_WORKFLOW_PROCEDURE.PROCEDURE_CODE"/>
        <bm:field name="procedure_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROCEDURE_TYPE_CODE" prompt="ZJ_WFL_WORKFLOW_PROCEDURE.PROCEDURE_TYPE_CODE"/>
        <bm:field name="procedure_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROCEDURE_DESC" prompt="ZJ_WFL_WORKFLOW_PROCEDURE.PROCEDURE_DESC"/>
        <bm:field name="exec_procedure" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXEC_PROCEDURE" prompt="ZJ_WFL_WORKFLOW_PROCEDURE.EXEC_PROCEDURE"/>
    </bm:fields>
    <bm:features>
        <db:sequence-pk/>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="procedure_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="procedure_id" queryOperator="="/>
        <bm:query-field field="procedure_code" queryOperator="like"/>
        <bm:query-field field="procedure_desc" queryOperator="like"/>
    </bm:query-fields>
    <bm:operations>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
            begin
				zj_wfl_workflow_pkg.delete_wfl_procedure
				(
					p_procedure_id            => ${@procedure_id},					
					p_user_id                 => ${/session/@user_id}
				);
			end;
			]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="过程代码${@procedure_code}已经存在!"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
