Home > Blockchain >  How can you prevent invoked workflow action in logic apps (standard) from retrying
How can you prevent invoked workflow action in logic apps (standard) from retrying

Time:07-21

In logic apps (standard), when using the "invoke workflow" action, there appears to be no ability to change the retry behaviour if the called workflow returns 400-500 error response status. The workflow will retry 4 times.

I need to disable the retry policy - can you?

enter image description here

"actions": {
"Invoke_a_workflow_in_this_workflow_app": {
    "type": "Workflow",
    "inputs": {
        "host": {
            "workflow": {
                "id": "wf-child"
            }
        },
        "headers": {
            "Content-Type": "application/json"
        },
        "body": "@triggerBody()"

    },
    "runAfter": {}

}

}

CodePudding user response:

As per documentation, you can edit the retryPolicy to none:

{
  "inputs": {
  <...>,
    "retryPolicy": {
      "type": "none"
    },
  <...>
  },
  "runAfter": {}
}

So for you, this should work:

"actions": {
  "Invoke_a_workflow_in_this_workflow_app": {
    "type": "Workflow",
    "inputs": {
      "host": {
        "workflow": {
          "id": "wf-child"
        }
      },
      "headers": {
        "Content-Type": "application/json"
      },
      "body": "@triggerBody()",
      "retryPolicy": {
        "type": "none"
      }
    },
    "runAfter": {}
  }
}
  • Related