<?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 a.workflow_code || '-' || a.workflow_desc workflow_desc,
        a.workflow_type_id,
        (select wt.workflow_type_code || '-' || wt.workflow_type_desc
           from zj_wfl_workflow_type wt
          where wt.workflow_type_id = a.workflow_type_id) workflow_type,
        b.service_id,
        (select z.service_name
           from zj_wfl_workflow_service z, zj_wfl_document_services j
          where z.service_id = b.service_id
            and j.workflow_id = a.workflow_id) service_name,
        (select z.service_desc
           from zj_wfl_workflow_service z, zj_wfl_document_services j
          where z.service_id = b.service_id
            and j.workflow_id = a.workflow_id) service_desc
   from zj_wfl_workflow a, ZJ_WFL_DOCUMENT_SERVICES b
  where a.workflow_id = b.workflow_id and a.workflow_id=${/parameter/@workflow_id}]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
