{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "workflows_Q1110447_name": { "defaultValue": "", "type": "String" } }, "variables": {}, "resources": [ { "type": "Microsoft.Logic/workflows", "apiVersion": "2017-07-01", "name": "[parameters('workflows_Q1110447_name')]", "location": "uksouth", "properties": { "state": "Enabled", "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "contentVersion": "1.0.0.0", "parameters": {}, "triggers": { "manual": { "type": "Request", "kind": "Http", "inputs": {} } }, "actions": { "For_each": { "foreach": "@variables('ArrayVariable')", "actions": { "Switch": { "runAfter": {}, "cases": { "Case": { "case": "A", "actions": { "Set_variable": { "runAfter": {}, "type": "SetVariable", "inputs": { "name": "Action", "value": "1" } } } }, "Case_2": { "case": "B", "actions": { "Set_variable_2": { "runAfter": {}, "type": "SetVariable", "inputs": { "name": "Action", "value": "2" } } } } }, "default": { "actions": { "Set_variable_3": { "runAfter": {}, "type": "SetVariable", "inputs": { "name": "Action", "value": "3" } } } }, "expression": "@items('For_each')", "type": "Switch" } }, "runAfter": { "Initialize_variable": [ "Succeeded" ] }, "type": "Foreach" }, "Initialize_variable": { "runAfter": { "Initialize_variable_2": [ "Succeeded" ] }, "type": "InitializeVariable", "inputs": { "variables": [ { "name": "Action", "type": "string" } ] } }, "Initialize_variable_2": { "runAfter": {}, "type": "InitializeVariable", "inputs": { "variables": [ { "name": "ArrayVariable", "type": "array", "value": [ "A", "B", "C" ] } ] } } }, "outputs": {} }, "parameters": {} } } ] }