wfl_instance_permission_check.lwm 1.91 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Mouse Chow  
    $Date: 2012-1-6 下午01:31:09  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            
            select 'Y' as IS_VALID from dual
            where 
            	exists
            	(
				select 1 from wfl_notification_record r where r.instance_id = ${/parameter/@instance_id} and r.user_id = ${/session/@user_id}
				)
				or exists 
				(
				select 1 from wfl_instance_node_recipient t where t.instance_id = ${/parameter/@instance_id} and t.user_id = ${/session/@user_id} 
				)
				or exists
				(
				select 1 from wfl_workflow_instance i where i.instance_id = ${/parameter/@instance_id} and i.created_by = ${/session/@user_id}
				)
				or exists
				(
				select 1 from wfl_approve_record war where war.instance_id = ${/parameter/@instance_id} and war.created_by = ${/session/@user_id}
				)
				or exists
				(
				select 1 from sys_role_function r ,sys_function  f where r.function_id = f.function_id and f.function_code = 'WFL3010'
				and r.role_id = ${/session/@role_id}
				)
				or exists
				(
				select 1 from sys_role_function r ,sys_function  f where r.function_id = f.function_id and 
				f.function_code in ('CSH5050','CSH5060','CSH3110',
				'CSH5030','CSH5080','CSH3200','CSH5020','EXP5060','EXP3130','EXP5360','EXP5400','EXP6110',
				'EXP5140','EXP5250','EXP5260','EXP5240','EXP5190','EXP5121','EXP5150','EXP5201','EXP6310',
				'EXP5200','EXP5210','EXP3110','EXP3700','CSH3040','CSH3060','CSH5250','ACP5030','ACP3100',
				'ACP5040','ACP5050','CSH5210','CSH5230','CSH5220','CSH5221','CSH5330')
				and r.role_id = ${/session/@role_id}
				)
			
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="IS_VALID"/>
    </bm:fields>
</bm:model>