<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
            begin
                csh_transaction_interface_pkg.post_interface(p_transaction_id =>${@transaction_id},
                                                             p_user_id =>${/session/@user_id},
                                                             p_err_count =>${@err_count});
            end;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="err_count" dataType="java.lang.Long" output="true" outputPath="@err_count"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
            begin
                if ${@flag} = 'SUBMIT' then
                    update CSH_TRANSACTION
                    set confirmed_flag = 'WF_APPROVING'
                    where transaction_id = ${@transaction_id};
                elsif ${@flag} = 'RETURN' then
                    update CSH_TRANSACTION
                    set confirmed_flag = 'WF_REJECTED'
                    where transaction_id = ${@transaction_id};
                end if;
            end;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
