<?xml version="1.0" encoding="UTF-8"?>
<a:service trace="true" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc">
    <a:init-procedure>
        <a:batch-apply sourcepath="/parameter">
            <p:switch test="@current_parameter/@_cus_status">
                <p:case value="insert">
                    <a:model-insert model="sys.SYS000.sys_config_customization"/>
                </p:case> 
                <p:case value="update">
                    <a:model-update model="sys.SYS000.sys_config_customization"/>
                </p:case>
                <p:case value="delete">
                    <a:model-delete model="sys.SYS000.sys_config_customization"/>
                </p:case>
                <p:case value="insert_column">
                    <a:model-insert model="sys.SYS1090.sys_dynamic_grids"/>
                    <p:method-invoke className="leaf.application.features.cstm.CustomSourceCode" methodName="gridConfigConvertToCust">
			            <p:arguments>
			                <p:argument path="instance" type="uncertain.ocm.IObjectRegistry"/>
			                <p:argument type="java.lang.Long" value="${@current_parameter/@grid_id}"/>
			            </p:arguments>
			        </p:method-invoke>
                </p:case> 
                <p:case value="update_column">
                    <a:model-update updatepassedfieldonly="true"  model="sys.SYS1090.sys_dynamic_grids"/>
                    <p:method-invoke className="leaf.application.features.cstm.CustomSourceCode" methodName="gridConfigConvertToCust">
			            <p:arguments>
			                <p:argument path="instance" type="uncertain.ocm.IObjectRegistry"/>
			                <p:argument type="java.lang.Long" value="${@current_parameter/@grid_id}"/>
			            </p:arguments>
			        </p:method-invoke>
                </p:case>
                <p:case value="delete_column">
                    <a:model-delete model="sys.SYS1090.sys_dynamic_grids"/>
                    <p:method-invoke className="leaf.application.features.cstm.CustomSourceCode" methodName="gridConfigConvertToCust">
			            <p:arguments>
			                <p:argument path="instance" type="uncertain.ocm.IObjectRegistry"/>
			                <p:argument type="java.lang.Long" value="${@current_parameter/@grid_id}"/>
			            </p:arguments>
			        </p:method-invoke>
                </p:case>
            </p:switch>
        </a:batch-apply>
        <p:method-invoke className="leaf.application.features.cstm.CustomSourceCode" methodName="gridConfigConvertToCustReOrder">
            <p:arguments>
                <p:argument path="instance" type="uncertain.ocm.IObjectRegistry"/>
                <p:argument type="java.lang.Long" value="${/parameter/@header_id}"/>
                <p:argument type="java.lang.String" value="${/parameter/@grid_id}"/>
            </p:arguments>
        </p:method-invoke>
    </a:init-procedure>
    <a:service-output output="/parameter"/>
</a:service>