如何从逻辑应用实例中查找变量的当前值? [英] How to find current value of variable from logic app instance?

查看:58
本文介绍了如何从逻辑应用实例中查找变量的当前值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的逻辑应用程序内部,我正在初始化一个变量,并且该变量的值可以在逻辑应用程序执行过程中改变.当逻辑应用程序仍处于运行模式(等待外部事件发生)时,我想要一种方法来查找逻辑应用程序中变量的当前值.

Inside my logic app, I am initializing a variable and this variable's value can change over the course of logic app execution. While logic app is still in running mode (waiting for external event to happen) I want a way to find the current value of the variable in logic app.

我总是可以将此变量的值存储在SQL Server或Blob存储之类的数据存储中,并从那里读取它,但是我不想使用外部存储.鉴于逻辑应用在某种程度上具有状态,我想知道是否有一种获取变量值的方法.

I can always store value of this variable in data store like SQL server or blob storage and read it from there but I don't want to use external storage. Given that logic apps are kind of stateful in a way, I am wondering if there is a way to get variable value.

推荐答案

因此,无法查看Logic App运行时的状态.某些数据可能在运行历史记录"中可用,但不一定是实时的,也没有简便的方法将其与任何外部信息相关联.

So, there isn't a way to peek at the state of a Logic App while it's running. Some data might be available in the Run History, but that's not necessarily real-time and there no easy way to correlate it with any external info.

这意味着外部机制仅是您的实用解决方案,但是这没什么问题.

That means an external mechanism is you're only practical solution, but there's nothing wrong with that.

我的建议是使用 Azure功能+ Redis缓存. Logic App可以通过某个键值(例如[LogicAppName] + [OrderID])定期更新其状态,然后另一个客户端可以按相同的模式进行查询.

My suggestion would be an Azure Function + Redis Cache. The Logic App can update its state periodically by some key value, [LogicAppName]+[OrderID] for example, then another client can query on that same pattern.

最终,如果您需要跟踪整个应用程序或业务流程,则可能希望将其提升为Application Insights.

Eventually, you may want to elevate this to Application Insights if you fine the need to track the entire app or business processes.

这篇关于如何从逻辑应用实例中查找变量的当前值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆