# Workflow variables n edge

**URL:** <https://forums.losant.com/t/workflow-variables-n-edge/3959>\
**Category:** Help\
**Tags:** edge\
**Created:** [July 28, 2021, 2:21pm UTC](https://forums.losant.com/t/workflow-variables-n-edge/3959 "2021-07-28T14:21:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [July 28, 2021, 2:21pm UTC](https://forums.losant.com/t/workflow-variables-n-edge/3959/1 "2021-07-28T14:21:01Z")

</div>

What is the easiest way to exchange some variable information between edge workflows?  
I was thinking of using application globals, but it doesn’t look like I can change a global value from an edge workflow. Read something about useing Redis or Mongo, but isn’t there a better way?

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [July 28, 2021, 3:02pm UTC](https://forums.losant.com/t/workflow-variables-n-edge/3959/3 "2021-07-28T15:02:40Z")

</div>

You’re referring to communication between two different [edge workflows](https://docs.losant.com/workflows/edge-workflows/) running on the same [edge compute device](https://docs.losant.com/devices/edge-compute/)? If you just want to share information between the two and access it as needed, I’d recommend the [SQL Node](https://docs.losant.com/workflows/data/sql/) using [SQLite](https://www.sqlite.org/index.html). Any workflow on the device can write to and read from the same local database file.

* * *

If you’d rather an event-based approach - as in, take some immediate action in Workflow B when Workflow A changes a value - you have a number of options …

- Workflow A sends data using a [UDP Send Node](https://docs.losant.com/workflows/outputs/udp-send/) and Workflow B picks it up with a [UDP Trigger](https://docs.losant.com/workflows/triggers/udp/).
- Configure your edge compute device to run a [local MQTT broker](https://docs.losant.com/mqtt/overview/#edge-mqtt-broker). Then, Workflow A publishes to the local broker with an [MQTT Node](https://docs.losant.com/workflows/outputs/mqtt/) and Workflow B is subscribed to that local broker topic with an [MQTT Trigger](https://docs.losant.com/workflows/triggers/mqtt/).
- Configure your device to run a [local webserver](https://docs.losant.com/edge-compute/edge-agent-usage/#webserver-http-request-trigger--http-response-node) (enabled by default). Workflow A sends a message to localhost using an [HTTP Node](https://docs.losant.com/workflows/data/http/) and Workflow B picks it up with an [HTTP Request Trigger](https://docs.losant.com/workflows/triggers/request/).
- Workflow A creates or edits a file using the [File: Write Node](https://docs.losant.com/workflows/data/file-write/) and Workflow B picks it up with a [File: Watch Trigger](https://docs.losant.com/workflows/triggers/file-watch/) or [File: Tail Trigger](https://docs.losant.com/workflows/triggers/file-tail/).

Then, if you wanted to store that value, you could use a [Storage: Set Node](https://docs.losant.com/workflows/data/store-value/) on Workflow B.

---

<div class="post-metadata">

**Author:** ![emcdee](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/emcdee/32/4313_2.png) [@emcdee](https://forums.losant.com/u/emcdee)\
**Post date:** [May 2, 2023, 10:30am UTC](https://forums.losant.com/t/workflow-variables-n-edge/3959/5 "2023-05-02T10:30:53Z")

</div>

Might be related… can you UDP Send to a local SQL DB ip / port and stash data that way?

---

<div class="post-metadata">

**Author:** ![emcdee](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/emcdee/32/4313_2.png) [@emcdee](https://forums.losant.com/u/emcdee)\
**Post date:** [May 2, 2023, 10:31am UTC](https://forums.losant.com/t/workflow-variables-n-edge/3959/6 "2023-05-02T10:31:44Z")

</div>

But the SQL Node look to be able to read and write… seems like the easiest

---

<div class="post-metadata">

**Author:** ![Sebastian\_Turner](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/sebastian_turner/32/4024_2.png) [@Sebastian\_Turner](https://forums.losant.com/u/Sebastian_Turner)\
**Post date:** [May 3, 2023, 4:05pm UTC](https://forums.losant.com/t/workflow-variables-n-edge/3959/7 "2023-05-03T16:05:44Z")

</div>

@emcdee,

Yes, you _could_ use the UDP Send Node to send to a local server, which then would then write to SQL, but it’s not advised due to the [caveats](https://docs.losant.com/workflows/outputs/udp-send/#udp-caveats) we’ve outlined in our documentation. As suggested, the SQL Node is more reliable and easier to integrate.
