由於Szymon Wylezol提到它似乎是錯誤的模板本身。從錯誤消息中我們知道表達式[concat('@equals(toLower(triggerBody()?['', parameters('workflows_Booking_name'),'s']?['Event']), 'create')')]
不正確。有關表達式的更多細節請參考document。
根據您提供的屏幕截圖,我們可以得到表達,如代碼視圖以下內容:
"actions": {
"Condition_-_Create_or_UpdateBookings": {
"type": "If",
"expression": "@equals(toLower(triggerBody()?['Bookings']?['Event']), 'create')",
"actions": {},
"runAfter": {}
}
}
請在Azure的門戶代碼視圖進行比較的代碼視圖中的VS。
那麼就應該準備好視圖在Visual Studio。更多詳細的設計,構建和在Visual Studio中請參閱部署Azure的邏輯應用到document
演示代碼。
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workflows_testlogic_name": {
"defaultValue": "testlogic",
"type": "string"
},
"workflows_tomtestLogicApp_name": {
"defaultValue": "tomtestLogicApp",
"type": "string"
}
},
"variables": {},
"resources": [
{
"comments": "Generalized from resource: '/subscriptions/ed0caab7-c6d4-45e9-9289-c7e5997c9241/resourceGroups/tomtestlogicApp/providers/Microsoft.Logic/workflows/testlogic'.",
"type": "Microsoft.Logic/workflows",
"name": "[parameters('workflows_testlogic_name')]",
"apiVersion": "2016-06-01",
"location": "eastasia",
"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": {
"schema": {
"properties": {
"event": {
"type": "string",
"value": ""
},
"name": {
"type": "string",
"value": ""
},
"participants": {
"type": "integer",
"value": ""
}
},
"type": "object"
}
}
}
},
"actions": {
"Condition": {
"actions": {},
"runAfter": {},
"expression": "@equals(toLower(triggerBody()?['name']), 'test')",
"type": "If"
}
},
"outputs": {}
},
"parameters": {}
},
"dependsOn": []
},
{
"comments": "Generalized from resource: '/subscriptions/ed0caab7-c6d4-45e9-9289-c7e5997c9241/resourceGroups/tomtestlogicApp/providers/Microsoft.Logic/workflows/tomtestLogicApp'.",
"type": "Microsoft.Logic/workflows",
"name": "[parameters('workflows_tomtestLogicApp_name')]",
"apiVersion": "2016-06-01",
"location": "eastasia",
"tags": {
"displayName": "LogicApp"
},
"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": {
"schema": {
"properties": {
"Bookings": {
"properties": {
"BookedByEmail": {
"type": "string"
},
"Event": {
"type": "string"
}
}
}
}
}
}
}
},
"actions": {
"Condition_-_Create_or_UpdateBookings": {
"actions": {},
"runAfter": {},
"expression": "@equals(toLower(triggerBody()?['Bookings']?['Event']), 'create')",
"type": "If"
}
},
"outputs": {}
},
"parameters": {}
},
"dependsOn": []
}
]
}
看起來模板本身有問題。如果仔細查看錯誤消息,表達式將包含[concat('...')],它看起來像ARM模板表達式,而不是邏輯應用程序定義表達式。你可以在代碼視圖中查看並確認是否是這種情況(並確認原始邏輯應用程序是否相同)? –
你可以分享模板嗎? – juvchan