Persistent Variables in Workato with a Global Variables Lookup Table
In Workato recipes, there is often a need for variables that persist across jobs. However, the native Variables action resets with each job. This guide presents a workaround using a Global Variables Lookup Table to maintain variable values across job iterations.
Global Variables Lookup Table
I created a dedicated lookup table called "Global Variables" with columns for variable_name, current_value, and previous_value. You can add more columns depending on your needs.
How it Works
Each time a job runs, retrieve the current value from the lookup table using a lookup table action step or a lookup formula. Then, update the current_value with the new data and set the previous_value to the previous current_value.
Benefits and Versatility
This method enables the use of persistent variables across different jobs, allowing workflows to seamlessly continue from the last recorded state. It’s a versatile approach, supporting multiple global variables across various projects, and enhances the robustness of your Workato recipes.