逻辑应用程序,C#中的Runlog任务结果 [英] Logic Apps, Runlog Task Result in C#

查看:97
本文介绍了逻辑应用程序,C#中的Runlog任务结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在执行逻辑应用程序时,每次执行都会获得运行日志.

When executeing a logic app, I get a run log for each execution.

如果您在门户网站中,转到home-> ->逻辑应用程序运行, 并在左侧的运行历史记录"中选择一个运行,您将获得如下概览:

If you, in the portal, go to home-> ->Logic app run, and in the Run History at the left hand side chooses a run you'll get a overview like this:

打开任务时,您可以从该任务获取原始输出

When you open a task, you can get the raw output from that task

我想从C#程序获取该输出.

I would like to get that output from a C# program.

我知道如何访问WorkflowRuns列表,但是从那里我只能获得运行结果,据我所知,我无法查询运行中的每个任务.

I know how to get access to the WorkflowRuns list, but from there I only get result of the run, and I can not, as far as I know, query each task in the run.

希望这使我更加清楚.

推荐答案

我认为您正在寻找您需要根据屏幕快照HasEnoughOPUSSelectedtriggerName中传递触发器的名称.

You'll need to pass in the name of your trigger in triggerName based on your screenshot HasEnoughOPUSSelected.

对于workflowName,您可以使用逻辑应用程序的名称.

For workflowName you can use the name of your logic app.

如果您在响应中的inputsLinks/outputsLinks中访问uri,则可以检索传入或传出触发器的所有数据.

If you access the uri in the inputsLinks / outputsLinks in the response you'll be able to retrieve all the data that was passed in or out of the trigger.

示例过时的输出.

{
  "value": [
      "properties": {
        "startTime": "2020-05-05T12:34:46.255558Z",
        "endTime": "2020-05-05T12:34:47.9734251Z",
        "scheduledTime": "2020-05-05T12:34:45.6500388Z",
        "status": "Succeeded",
        "code": "OK",
        "correlation": {
          "clientTrackingId": "XXXXXXXXXXXXXXXXXXXXXX"
        },
        "inputsLink": {
          "uri": "https://prod-85.westeurope.logic.azure.com:443/workflows/YYYY/triggers/When_a_new_email_arrives/histories/XXXXXXXXXXXXXXXXXXXXXX/contents/TriggerInputs?api-version=2016-06-01&se=2020-08-05T15%3A00%3A00.0000000Z&sp=%2Ftriggers%2FWhen_a_new_email_arrives%2Fhistories%2FXXXXXXXXXXXXXXXXXXXXXX%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=XXXX",
          "contentVersion": "AAA",
          "contentSize": 298,
          "contentHash": {
            "algorithm": "md5",
            "value": "AAA"
          }
        },
        "outputsLink": {
          "uri": "https://prod-85.westeurope.logic.azure.com:443/workflows/YYYY/triggers/When_a_new_email_arrives/histories/XXXXXXXXXXXXXXXXXXXXXX/contents/TriggerOutputs?api-version=2016-06-01&se=2020-08-05T15%3A00%3A00.0000000Z&sp=%2Ftriggers%2FWhen_a_new_email_arrives%2Fhistories%2FXXXXXXXXXXXXXXXXXXXXXX%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=XXXXX",
          "contentVersion": "BBB",
          "contentSize": 129395,
          "contentHash": {
            "algorithm": "md5",
            "value": "BBB"
          }
        },
        "fired": true,
        "run": {
          "name": "XXXXXXXXXXXXXXXXXXXXXX",
          "id": "/subscriptions/ABC/resourceGroups/ResourceGroupName/providers/Microsoft.Logic/workflows/LogicAppName/runs/XXXXXXXXXXXXXXXXXXXXXX",
          "type": "Microsoft.Logic/workflows/runs"
        }
      },
      "id": "/subscriptions/ABC/resourceGroups/ResourceGroupName/providers/Microsoft.Logic/workflows/LogicAppName/triggers/When_a_new_email_arrives/histories/XXXXXXXXXXXXXXXXXXXXXX",
      "name": "XXXXXXXXXXXXXXXXXXXXXX",
      "type": "Microsoft.Logic/workflows/triggers/histories"
    }
  ]
}

这篇关于逻辑应用程序,C#中的Runlog任务结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆