<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" xmlns:p="uncertain.proc"
           trace="true">
    <a:init-procedure>
<!--        <s:server-script><![CDATA[-->
<!--            //执行工作流结束时,调用章-->

<!--            importPackage(Packages.com.hand.hls.hlcm.xxx.service);-->

<!--            var service = $spring(ContractSignatureService);-->

<!--            var node_action_bm = $bm('zjwfl.ZJWFL5110.xxx_signature');-->
<!--            var node_action_result = node_action_bm.queryAsMap({-->
<!--                    "workflow_code": 'CON_INCEPTION_LEASE',-->
<!--                    "sequence_num": '20',-->
<!--                    "action_type": '1'-->
<!--            });-->
<!--            var node_action_records = node_action_result.getChildren();-->
<!--            var node_action_id = node_action_records[0].node_action_id;-->

<!--            //var request = $ctx['_instance.javax.servlet.http.HttpServletRequest'];-->
<!--            var iRequest = $spring(Packages.com.hand.hap.core.impl.RequestHelper.getCurrentRequest());-->

<!--            var contract_bm = $bm('zjwfl.ZJWFL5110.xxx_signature_contract');-->
<!--            var contract_result = contract_bm.queryAsMap({-->
<!--                    "workflow_type_code": 'CON_INCEPTION_LEASE',-->
<!--                    "record_id": $ctx.parameter.record_id-->
<!--            });-->
<!--            var contract_records = contract_result.getChildren();-->
<!--            println('*********1********' + $ctx.parameter.record_id + '******************');-->
<!--            if(contract_records.length >0){-->
<!--                var parameter_value = contract_records[0].parameter_value-->
<!--                println('******2***********' + parameter_value + '******************');-->
<!--                if (node_action_id == $ctx.parameter.node_action_id){-->

<!--                    var contractId = parameter_value;-->
<!--                    service.signDs(contractId,iRequest);-->
<!--                }-->
<!--            }-->

<!--        ]]></s:server-script>-->
        <model-execute model="zjwfl.ZJWFL5110.zj_wfl_approve_agree"/>
    </a:init-procedure>
    <a:service-output output="/parameter"/>
</a:service>