fnd_request_job.lwm 1.34 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wushuang  
    $Date: 2011-11-24 下午1:55:05  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features">
    <bm:operations>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
            	DECLARE
            		v_job_type NUMBER;
                BEGIN
                	--将前台执行的JOB类型转换为后台需要的格式
                	IF ${/parameter/@type} = 'RUN' THEN
                		v_job_type := fnd_request_pkg.g_job_type_is_run;
                	ELSIF ${/parameter/@type} = 'DELETE' THEN
                		v_job_type := fnd_request_pkg.g_job_type_is_delete;
                	ELSIF ${/parameter/@type} = 'SLEEP' THEN
                		v_job_type := fnd_request_pkg.g_job_type_is_sleep;
                	ELSIF ${/parameter/@type} = 'WAKE' THEN
                		v_job_type := fnd_request_pkg.g_job_type_is_wake;
                	END IF;
                	
	                fnd_request_pkg.job_handle(p_request_id => ${@request_id},
	                                           p_user_id 	=> ${/session/@user_id},
	                                           p_job_type	=> v_job_type);
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>