<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    *
                FROM
                    (SELECT
                        pccr.hd_id,
                        pccr.wfl_instance_id,
                        wah.create_date_fmt,
                        wah.node_desc,
                        wah.action_type_desc,
                        wah.comment_text,
                        wah.approver
                    FROM
                        hn_payment_cond_change_req pccr,
                        zj_wfl_approve_history_v wah
                    WHERE
                        pccr.req_status      = 'APPROVED' AND
                        pccr.wfl_instance_id = wah.instance_id
                    ) t1 #WHERE_CLAUSE#
                ORDER BY
                    t1.wfl_instance_id,
                    create_date_fmt
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.hd_id=${@hd_id}"/>
    </bm:data-filters>
</bm:model>
