Skip to main content Skip to footer

Search Crosser Knowledge Base

Keeping state in Flows

Many use cases require some information to be kept between multiple runs of the Flow, e.g. to remember the last time a Flow ran so that dynamic queries to get updates from a database or a service can be created.

For these purposes the Crosser Node has a built-in key/value store that is accessed through the ‘Key Value Set/Get/Delete’ modules. A Flow can use multiple stores and each store can keep any number of keys. The values assigned to keys can be simple values, like a number, or complex structures like a hierarchical object or an array. Each store can either be kept in memory, or stored on disk. The latter is useful if you don’t want to lose the data (state) when restarting the Flow. Stores on disk can also be accessed from any Flow and can therefore be used to share data between Flows running on the same Node. However, if you just need to transfer data from one Flow to another, the MQTT broker is a better option.

To see an example of using the ‘Key Value’ modules, take a look at the ‘Change Data Capture’ FlowApps.

Crosser CDC Flow

Crosser Example | Change Data Capture Flow

About the author

Goran Appelquist

Göran has 20 years experience in leading technology teams. He’s the lead architect of our end-to-end solution and is extremely focused in securing the lowest possible Total Cost of Ownership for our customers.

"Hidden Lifecycle (employee) cost can account for 5-10 times the purchase price of software. Our goal is to offer a solution that automates and removes most of the tasks that is costly over the lifecycle.

My career started in the academic world where I got a PhD in physics by researching large scale data acquisition systems for physics experiments, such as the LHC at CERN. After leaving academia I have been working in several tech startups in different management positions over the last 20 years.

In most of these positions I have stood with one foot in the R&D team and another in the product/business teams. My passion is learning new technologies, use it to develop innovative products and explain the solutions to end users, technical or non-technical."