bgfl_oa_push.lsc 898 Bytes
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
    <a:init-procedure>
        <s:server-script><![CDATA[
        	importPackage(java.io);
        	importPackage(Packages.DefaultNamespace);

        	var bgflOaPushMain = new BgflOaPushMain();
        	var oa_push = $bm('inf.INF104.bgfl_oa_recipient_v');
	        var result = oa_push.queryAsMap();
	        var arr = result.getChildren();
	        for(var i=0;i<arr.length;i++){
	            bgflOaPushMain._init(arr[i].oa_user,arr[i].oa_key,arr[i].oa_to_do_count);
	            var sendResult = bgflOaPushMain._send();
	            oa_push.execute({
	                user_id:arr[i].user_id,
	                oa_return:sendResult
	            });
	        }
        ]]></s:server-script>
    </a:init-procedure>
</a:service>