6

SharePoint Online 触发的Automate工作流的调试

 2 years ago
source link: https://www.cnblogs.com/jianyus/p/15861564.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

SharePoint Online 触发的Automate工作流的调试

  前言

  我们之前为大家介绍了在使用SharePoint Online列表触发工作流,工作流的内容有Teams审批和Outlook审批,好多人说我写的不完整,只是在Teams和Outlook中添加了审批,后面的却没有介绍。

  其实,大家如果熟悉了Power Automate 工作流以后,很快就知道如何做下面的事情了,今天,为大家介绍一下如何调试Power Automate工作流。

  正文

  1.找到我们之前创建的工作流,点击名称进入详细介绍,如下图:

256729-20220203153201294-1540955531.png

  2.在28天运行历史记录里,找到之前测试的历史记录,如下图:

256729-20220203153502840-493673209.png

  3.在这个工作流运行结果的页面,点击你想查看的操作,如下图:

256729-20220203153627426-1061091519.png

  4.点击显示原始输出,如下图:

256729-20220203153757180-1138147958.png

  5.我们分析一下这个JSON,如下:

  Tips:我们呢可以看到submitActionId这个属性,就是我们点击的按钮,所以后面是批准还是拒绝,完全看这个;

  同时,data里面的txtComments就是我们在审批中,添加的评论!

{
    "headers": {
        "Accept-Encoding": "gzip,deflate",
        "Host": "prod-20.southeastasia.logic.azure.com",
        "client-request-id": "8bcc89ab-dff8-4cda-a28f-e8036807fbed",
        "x-ms-activity-vector": "IN.03.IN.07",
        "Content-Length": "566",
        "Content-Type": "application/json; charset=utf-8"
    },
    "body": {
        "responseTime": "2022-02-03T07:34:09.1897337Z",
        "responder": {
            "objectId": "630c7a25-bdea-433b-ae89-6a98763aa0c4",
            "tenantId": "412bb5e1-d687-4320-bf4e-b8f89048446d",
            "email": "[email protected]",
            "userPrincipalName": "[email protected]",
            "displayName": "霖雨"
        },
        "submitActionId": "btnSubmit",
        "messageId": "1643872615486",
        "messageLink": "https://teams.microsoft.com/l/message/19:630c7a25-bdea-433b-ae89-6a98763aa0c4_358f0194-6b0e-4dd3-af35-c24fe8a9ec87@unq.gbl.spaces/1643872615486?context=%7B%22contextType%22:%22chat%22%7D",
        "data": {
            "txtComments": "批准"
        }
    }
}

  结束语

  可能介绍的比较简单,不过,这样调试可以让我们快速得知一个操作输入的是什么,输出的是什么,接下来该如何运行。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK