标准逻辑应用运行超时设置不起作用。

huangapple go评论63阅读模式
英文:

Standard logic app run timeout setting is not working

问题

Azure逻辑应用工作流的RunTimeout设置不起作用。

我遵循的链接:

运行持续时间设置

主机设置

我尝试过的事情:

  1. 在主机设置中添加了Runtime.Backend.FlowRunTimeout设置为30秒。
  2. 停止,重新启动逻辑应用。
  3. 在HTTP触发器逻辑应用中添加了1分钟的延迟。
  4. 它在等待1分钟延迟后执行,而不是超时。
  5. 还尝试增加延迟时间和超时持续时间,仍然没有运行成功。
英文:

Azure logic app workflow RunTimeout setting is not working.

Links I followed,

Run duration setting

Host settings

Things I tried,

  1. Added Runtime.Backend.FlowRunTimeout setting in host settings to 30 seconds.
  2. Stopped, Restarted logic app
  3. Added delay for 1 minute in HTTP trigger logic app.
  4. It executed after waiting for a delay of 1 minute instead of timing out.
  5. Also tried increasing delay time and timeout duration, still no luck.

答案1

得分: 1

在我这边复制后,我也遇到了相同的问题。然而,为了满足您的要求,我尝试使用逻辑应用中的HTTP触发器自动化此过程,调用所需的标准逻辑应用以及其工作流和运行。我尝试取消那些超出预期时间的运行。以下是我的逻辑应用的流程。

标准逻辑应用运行超时设置不起作用。

逻辑应用的代码视图:

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            ...
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "kind": "Http",
                "type": "Request"
            }
        }
    },
    "kind": "Stateful"
}

请注意,以上是逻辑应用的一部分,其中包括动作和触发器的定义。

英文:

After reproducing from my end, I faced the same issue. However, to achieve your requirement, I tried to automate this using HTTP triggers in a logic app calling the required standard logic app along with its workflows and runs. I tried to cancel the run which are taking more time than the expected time. Below is the flow of my logic app.

标准逻辑应用运行超时设置不起作用。

code view of my logic app

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"For_each_1": {
"actions": {
"Condition": {
"actions": {
"For_each_2": {
"actions": {
"HTTP_to_cancel_the_run_that_exceeding_the_limit": {
"inputs": {
"headers": {
"Authorization": "<BEARER_TOKEN>"
},
"method": "POST",
"uri": "https://management.azure.com/subscriptions/<SUB_ID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/la76307366/hostruntime/runtime/webhooks/workflow/api/management/@{item()?['id']}/cancel?api-version=2022-09-01"
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "Http"
}
},
"foreach": "@outputs('Parse_JSON_to_get_individual_run')?['body']?['value']",
"type": "foreach"
}
},
"else": {
"actions": {}
},
"expression": {
"and": [
{
"equals": [
"@item()?['properties']?['status']",
"Running"
]
}
]
},
"type": "If"
}
},
"foreach": "@outputs('Parse_JSON_to_get_individual_run')?['body']?['value']",
"runAfter": {
"Parse_JSON_to_get_individual_run": [
"SUCCEEDED"
]
},
"type": "foreach"
},
"HTTP_to_get_workflow_runs": {
"inputs": {
"headers": {
"Authorization": "<BEARER_TOKEN>"
},
"method": "GET",
"uri": "https://management.azure.com/subscriptions/<SUB_ID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/la76307366/hostruntime/runtime/webhooks/workflow/api/management/workflows/@{item()['name']}/runs?api-version=2022-09-01"
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "Http"
},
"Parse_JSON_to_get_individual_run": {
"inputs": {
"content": "@body('HTTP_to_get_workflow_runs')",
"schema": {
"properties": {
"value": {
"items": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"properties": {
"properties": {
"correlation": {
"properties": {
"clientTrackingId": {
"type": "string"
}
},
"type": "object"
},
"outputs": {
"properties": {},
"type": "object"
},
"startTime": {
"type": "string"
},
"status": {
"type": "string"
},
"trigger": {
"properties": {
"correlation": {
"properties": {
"clientTrackingId": {
"type": "string"
}
},
"type": "object"
},
"endTime": {
"type": "string"
},
"name": {
"type": "string"
},
"originHistoryName": {
"type": "string"
},
"outputsLink": {
"properties": {
"contentSize": {
"type": "integer"
},
"uri": {
"type": "string"
}
},
"type": "object"
},
"startTime": {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
},
"waitEndTime": {
"type": "string"
},
"workflow": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"properties",
"id",
"name",
"type"
],
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
},
"runAfter": {
"HTTP_to_get_workflow_runs": [
"SUCCEEDED"
]
},
"type": "ParseJson"
}
},
"foreach": "@outputs('Parse_JSON')['body']",
"runAfter": {
"Parse_JSON": [
"SUCCEEDED"
]
},
"type": "foreach"
},
"HTTP": {
"inputs": {
"headers": {
"Authorization": "<BEARER_TOKEN>"
},
"method": "GET",
"uri": "https://management.azure.com/subscriptions/<SUB_ID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/la76307366/hostruntime/runtime/webhooks/workflow/api/management/workflows?api-version=2022-09-01"
},
"runAfter": {},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "Http"
},
"Parse_JSON": {
"inputs": {
"content": "@body('HTTP')",
"schema": {
"items": {
"properties": {
"definition_href": {
"type": "string"
},
"health": {
"properties": {
"state": {
"type": "string"
}
},
"type": "object"
},
"href": {
"type": "string"
},
"isDisabled": {
"type": "boolean"
},
"kind": {
"type": "string"
},
"name": {
"type": "string"
},
"triggers": {
"properties": {
"When_a_HTTP_request_is_received": {
"properties": {
"kind": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"required": [
"name",
"definition_href",
"href",
"kind",
"triggers",
"isDisabled",
"health"
],
"type": "object"
},
"type": "array"
}
},
"runAfter": {
"HTTP": [
"SUCCEEDED"
]
},
"type": "ParseJson"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"When_a_HTTP_request_is_received": {
"kind": "Http",
"type": "Request"
}
}
},
"kind": "Stateful"
}

答案2

得分: 0

经过与Microsoft团队的跟进,可以设置"Runtime.Backend.FlowRunTimeout"的最小值为7天。

这里是Github问题的参考链接 - RunTimeout Issue

还合并了一个PR来更新他们的文档,以便以后更少的人受到影响。
这个最小值将在这里的几天内更新 - Microsoft Doc

英文:

After following up with Microsoft team, the minimum value which can be set for "Runtime.Backend.FlowRunTimeout" is 7 days.

Here is the Github issue ref - RunTimeout Issue

Also merged a PR to update this in their doc so less people suffer on this later.
This minimum value will be updated here in a few days - Microsoft Doc

huangapple
  • 本文由 发表于 2023年5月22日 22:46:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/76307366.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定