azureworkflowazure-logic-appsdesigner

Defined multiple variable in Azure Logic app, once deploy via ARM template, shows parallel variable in Logic App designer


I firstly designed the logic app in designer, everything looks fine. All 9 variables were defined sequently. I copied the code into ARM template with other parameters. Once I deployed ARM template via Octopus to Azure. 3 of the variables showed as parallel with main processing workflows. And one of the set variable give "Variable is not initialized" error. This is so bizarre to me. Is there any limitation in Azure LogicApp?


Solution

  • It sounds like the "runAfter" on some of your initialize variable actions may be wrong. The runAfter of an action should name the action immediately preceding. For example, in the case below, the action "Initialize_variable_-item_number" runs after the action "Initialize_variable-_items" succeeds. The runAfter keeps logic app actions executing sequentially rather than concurrently.

                "Initialize_variable_-_item_number": {
              "runAfter": {
                "Initialize_variable_-_items": [
                  "Succeeded"
                ]
              },
              "type": "InitializeVariable",
              "inputs": {
                "variables": [
                  {
                    "name": "item number",
                    "type": "integer",
                    "value": 0
                  }
                ]
              }
            }