我们在应用服务环境中部署了一个逻辑应用,由服务总线主题消息触发,然后连接到功能应用。为了部署到不同的环境,我们按照here的建议参数化了connections.json文件。但部署后,工作流无法触发,并且没有从服务总线获取任何消息。
下面是connections.json文件。
{
"functionConnections": {
"azureFunctionOperation": {
"triggerUrl": "https://@appsetting('FUNCTIONAPPNAME').@appsetting('APPSERVICEENVIRONMENTNAME').appserviceenvironment.net/api/FunctionInApp",
"authentication": {
"name": "Code",
"type": "QueryString",
"value": "@appsetting('FunctionInApp_ConnectionKey')"
},
"displayName": "FunctionInApp-Connection",
"function": {
"id": "/subscriptions/@appsetting('SUBSCRIPTIONID')/resourceGroups/@appsetting('FUNCTIONAPPRESOURCEGROUPNAME')/providers/Microsoft.Web/sites/@appsetting('FUNCTIONAPPNAME')/functions/FunctionInApp"
}
}
},
"managedApiConnections": {},
"serviceProviderConnections": {
"FileSystem": {
"displayName": "NASConnection",
"parameterValues": {
"mountPath": "@appsetting('FILESYSTEM_MOUNTPATH')"
},
"serviceProvider": {
"id": "/serviceProviders/FileSystem"
}
},
"serviceBus": {
"displayName": "ServiceBusConnection",
"parameterSetName": "connectionString",
"parameterValues": {
"connectionString": "@appsetting('SERVICEBUS_CONNECTIONSTRING')"
},
"serviceProvider": {
"id": "/serviceProviders/serviceBus"
}
},
"sql-2": {
"displayName": "UserManagedIdentitySQlConnection",
"parameterSetName": "ManagedServiceIdentity",
"parameterValues": {
"authProvider": {
"Type": "ManagedServiceIdentity"
},
"databaseName": "@appsetting('SQLDATABASENAME')",
"managedIdentityClientId": "@appsetting('SQL_MANAGEDIDENTITYCLIENTID')",
"managedIdentityType": "UserAssigned",
"serverName": "@appsetting('SQLSERVERNAME').database.windows.net"
},
"serviceProvider": {
"id": "/serviceProviders/sql"
}
}
}
}
已验证所有应用程序设置值均已到位,并且当我使用门户视图详细信息屏幕时,所有值均正确显示。
但是当我们尝试在工作流程中手动进行更改并保存时,它会失败并出现以下错误
{
"error": {
"code": "WorkflowConnectionsInvalidConnectionValue",
"message": "The 'functionConnections' property in connection.json has a value that cannot be parsed."
}
}
我们无法找出错误中提到的
functionConnections
属性中的任何问题。
您能帮我们解决这个错误吗?
您需要生成一个二头肌支持器,它可以跨环境动态生成连接。
这里有一个使用它的演示。 使用 Bicep 脚本将 API 连接集成到标准逻辑应用程序中