友空间待办消息

  • 沙箱暂不支持、demo为生产环境

1、在函数设计页面

图2

 let AbstractTrigger = require('AbstractTrigger');
 class MyTrigger extends AbstractTrigger {
     execute(context, param) {
         var receiver = ["cb5cd80d-b57b-447e-a64c-511ece15792b"];
         var channels = ["uspace"];
         var templateCode = "entryfile-remind_1002##neS968Cd";
         var busiData = {
             "entryfile-remind.staffname": "果果"
         }
         var createToDoExt = {
             // web端
             "webUrl": "https://open.diwork.com",
             // 手机端
             "mUrl": "https://open.diwork.com"
         }
         var messageInfo = {
             'sysId': 'diwork',
             'tenantId': 'x73uqmdb',
             'receiver': receiver,
             'templateCode': templateCode,
             'channels': channels,
             'busiData': busiData,
             'messageType': 'createToDo',
             'createToDoExt': createToDoExt
         };
         var result = sendMessage(messageInfo);
     }
 }
 exports({
     "entryPoint": MyTrigger
 });

2、结果验证

图3

3、解释

待办点完之后还是会在待处理下、需要需要调用标记已办的接口(消息就是需要业务调用,不然下游无法知道 业务是否处理完成)

Copyright © 用友 -【生态技术部】 2021 all right reserved,powered by Gitbook修订时间: 2022-01-18 14:55:15

results matching ""

    No results matching ""