<?xml version="1.0" encoding="UTF-8"?>
<bm:model   xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:fields>
        <bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WORKFLOW_ID"/>
        <bm:field name="workflow_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="WORKFLOW_CODE" prompt="代码"/>
        <bm:field name="workflow_desc" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="WORKFLOW_DESC" prompt="描述"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                   select a.workflow_id,
                          a.workflow_code,
                          a.workflow_desc
                     from zj_wfl_workflow a ,
                          zj_wfl_workflow_assigns b
                    #WHERE_CLAUSE#
             ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field field="workflow_code" queryExpression="a.workflow_code like upper(${@workflow_code})"/>
        <bm:query-field field="workflow_desc" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="a.workflow_id = b.workflow_id"/>
        <bm:data-filter enforceOperations="query" expression="b.enabled_flag = &apos;Y&apos;"/>
        <bm:data-filter enforceOperations="query" expression="b.company_id = ${/session/@company_id} "/>
    </bm:data-filters>
</bm:model>
