Azure 预编译函数不适用于逻辑应用程序
Azure pre-compiled Functions not available to Logic Apps
我们在 VB.NET 中使用 visual studio 2017 和 azure 预编译函数。使用 func.exe CLI 工具在本地成功地 运行 所有函数。我们可以将 Function App 发布到 Azure,在那里我们可以在门户中查看和测试。
当我们尝试将函数用作逻辑应用程序的一部分时存在问题。我们可以添加一个选择 Azure Functions 的操作,并且可以看到我们的函数应用程序,但是 none 的底层函数是 available/missing.
我错过了什么?
编辑
我正在使用 http 触发器和网络挂钩。
编辑
确实是自定义路由
逻辑应用仅支持 'Generic Web Hooks' 类型的函数。您没有说明您使用的是什么类型,但如果您使用的是 'http trigger' 函数,那可能就是问题所在。
逻辑应用程序也有类似的问题。我的一些 HttpTrigger
功能运行良好,而另一些则不行。我发现唯一的区别是路由。使用自定义路由的函数未显示在逻辑应用操作选择器中。我刚刚删除了自定义路线,一切正常。
我在这里打开了一个问题:
**编辑:**
以下是 Azure 团队的回答:
This is by design. As Functions with routes as the way the Azure Function is invoked from Logic Apps is via calling an API "list invoke URL." That URL will look something like https://function.azurewebsites.net/api/my/{custom}/route?code=123 and Logic App doesn't have a way to parse the route template. In other words we don't know what is static, and what should be replaced, and don't have a way to "replace" that with the native action.
You can get around it by providing an OpenAPI definition for the function and we will render the card based on the path parameters specified in swagger. Can also not use route if need to show in Logic Apps.
在 javascript 函数中需要从 function.json
中删除 route
部分
所以,我可以从 Logic Apps Designer
添加这个功能
我们在 VB.NET 中使用 visual studio 2017 和 azure 预编译函数。使用 func.exe CLI 工具在本地成功地 运行 所有函数。我们可以将 Function App 发布到 Azure,在那里我们可以在门户中查看和测试。
当我们尝试将函数用作逻辑应用程序的一部分时存在问题。我们可以添加一个选择 Azure Functions 的操作,并且可以看到我们的函数应用程序,但是 none 的底层函数是 available/missing.
我错过了什么?
编辑 我正在使用 http 触发器和网络挂钩。
编辑 确实是自定义路由
逻辑应用仅支持 'Generic Web Hooks' 类型的函数。您没有说明您使用的是什么类型,但如果您使用的是 'http trigger' 函数,那可能就是问题所在。
逻辑应用程序也有类似的问题。我的一些 HttpTrigger
功能运行良好,而另一些则不行。我发现唯一的区别是路由。使用自定义路由的函数未显示在逻辑应用操作选择器中。我刚刚删除了自定义路线,一切正常。
我在这里打开了一个问题:
**编辑:** 以下是 Azure 团队的回答:
This is by design. As Functions with routes as the way the Azure Function is invoked from Logic Apps is via calling an API "list invoke URL." That URL will look something like https://function.azurewebsites.net/api/my/{custom}/route?code=123 and Logic App doesn't have a way to parse the route template. In other words we don't know what is static, and what should be replaced, and don't have a way to "replace" that with the native action.
You can get around it by providing an OpenAPI definition for the function and we will render the card based on the path parameters specified in swagger. Can also not use route if need to show in Logic Apps.
在 javascript 函数中需要从 function.json
route
部分
所以,我可以从 Logic Apps Designer
添加这个功能