<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: linjinxiao  
    $Date: 2012-8-1 上午10:42:32  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="task_id" dataType="java.lang.Long" input="false" output="true"/>
                <bm:parameter name="task_name" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="task_description" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="executor_instance" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="proc_file_path" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="proc_content" dataType="java.sql.Clob" input="true" output="false"/>
                <bm:parameter name="context" dataType="java.sql.Clob" input="true" output="false"/>
                <bm:parameter name="retry_time" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="time_out" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="priority" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="task_type" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="sql" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                begin
                    ${@task_id} := SYS_TASKS_PKG.ADD_TASK
                    (
                        p_task_name=>${@task_name},
                        p_task_description=>${@task_description},
                        p_executor_instance=>${@executor_instance},
                        p_proc_file_path=>${@proc_file_path},
                        p_proc_content=>${@proc_content},
                        p_context=>${@context},
                        p_priority=>${@priority},
                        p_task_type=>${@task_type},
                        p_sql=>${@sql},
                        p_retry_time => ${@retry_time},
                        p_time_out => ${@time_out},
                        p_user_id=>nvl(${/session/@user_id},-1)
                    );
                end;]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
