<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="contract_id" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="search_term_1" output="true"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                declare 
                   v_search_term_1  varchar2(30);
                begin
                    select search_term_1 into v_search_term_1 from con_contract where contract_id = ${@contract_id};
                    if v_search_term_1 is null then
                    	CUS_CON_CONTRACT_PKG.GET_CONTRACT_SEARCH_TERM
	                    (
	                        p_contract_id=>${@contract_id}
	                    );
                    end if;
                    select search_term_1 into ${@search_term_1} from con_contract where contract_id = ${@contract_id};
                end;]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
