服务流程通过异步调用多个启动方案并扫描启动方案的执行结果

栏目:云苍穹知识作者:金蝶来源:金蝶云社区发布:2024-09-23浏览:1

服务流程通过异步调用多个启动方案并扫描启动方案的执行结果

1 业务背景

  • 多个启动方案通过服务流程异步发起调用,并且希望启动方案的执行结果同时执行完成后,继续执行服务流程后续任务。


2 解决方案

2.1 方案总述

  • 通过服务流程同时启动7个启动方案,并且每分钟扫描执行结果

2.2 实现步骤

服务流程脚本


r0=invokeMicroService('isc',   'iscb', 'ISCDataCopyService', 'start', "T_BD_CASHFLOW-tk_sung_nc_cashflowitem",{"org":org,"year":year,"period":period,"currency":currency},{});

r1 =   invokeMicroService('isc', 'iscb', 'ISCDataCopyService', 'start',   "V_NC_XJLL_TEE_BOOK-tk_sung_nc_cashflowentry",{"org":org,"year":year,"period":period,"currency":currency});

r2 =   invokeMicroService('isc', 'iscb', 'ISCDataCopyService', 'start',   "V_NC_XJLL_TEE_NBZH_HZ-tk_sung_nc_cashflow_nbzh_split",{"org":org,"year":year,"period":period,"currency":currency});

r3 =   invokeMicroService('isc', 'iscb', 'ISCDataCopyService', 'start',   "BYJEtk_sung_nc_cashflow_nbzh-t_bcm_mddata@fi",{"org":org,"year":year,"period":period,"currency":currency},{});

r4 =   invokeMicroService('isc', 'iscb', 'ISCDataCopyService', 'start',   "BNLJtk_sung_nc_cashflow_nbzh-t_bcm_mddata@fi",{"org":org,"year":year,"period":period,"currency":currency},{});

r5 =   invokeMicroService('isc', 'iscb', 'ISCDataCopyService', 'start',   "BYJE_v_nc_XJLL-t_bcm_mddata@fi",{"org":org,"year":year,"period":period,"currency":currency},{});

r6 =   invokeMicroService('isc', 'iscb', 'ISCDataCopyService', 'start',   "BNLJ_v_nc_XJLL-t_bcm_mddata@fi",{"org":org,"year":year,"period":period,"currency":currency});

 

var   flag = false ;

 

while(!flag){

  Sleep(60 秒);

  if(!r0.state){

     r0.state = getState(r0);

  }

  if(!r1.state){

     r1.state = getState(r1);

  }

  if(!r2.state){

    r2.state = getState(r2);

}

  if(!r3.state){

    r3.state = getState(r3);

}

if(!r4.state){

    r4.state = getState(r4);

}

 

if(!r5.state){

    r5.state = getState(r5);

}

 

if(!r6.state){

    r6.state = getState(r6);

}

flag =   r0.state &&r1.state &&r2.state &&r3.state &&r4.state   &&r5.state &&r6.state;

 

}


3 相关文档


集成服务流程操作指南:https://developer.kingdee.com/article/98890752746688768 




服务流程通过异步调用多个启动方案并扫描启动方案的执行结果

1 业务背景多个启动方案通过服务流程异步发起调用,并且希望启动方案的执行结果同时执行完成后,继续执行服务流程后续任务。2 解决方案2....
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息