<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Hongquan.Dai  
    $Date: 2018-3-13 上午10:39:54  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
                BEGIN
                    con_contract_pkg.get_if_self_definition(p_product_id         => ${@product_id},
                                                            p_user_id            => ${/session/@user_id},
                                                            p_if_self_definition => ${@if_self_definition});
                END;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="if_self_definition" dataType="java.lang.String" input="false" output="true" outputPath="@if_self_definition"/>
            </bm:parameters>
        </bm:operation>



        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                BEGIN
                    fnd_sc_score_pkg.fnd_sc_score(p_contract_id              => ${@contract_id},
                                                  p_score_template_code      => ${@score_template_code},
                                                  p_user_id                  => ${/session/@user_id},
                                                  p_company_id               => ${/session/@company_id},
                                                  p_evaluate_level           => ${@evaluate_level},
                                                  p_result_id                => ${@result_id},
                                                  p_evaluate_value           => ${@evaluate_value});

                END;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="evaluate_level" dataType="java.lang.String" input="false" output="true" outputPath="@evaluate_level"/>
                <bm:parameter name="evaluate_value" dataType="java.lang.Double" input="false" output="true" outputPath="@evaluate_value"/>
                <bm:parameter name="result_id" dataType="java.lang.Long" input="false" output="true" outputPath="@result_id"/>
            </bm:parameters>
        </bm:operation>



    </bm:operations>
</bm:model>
