I will admit my understanding of variables in Workato is not extensive, but working with variables has been cumbersome.
We would love to see real variables with a sense of scope and global variables. The documentation says a variable is available to all child recipes, however, they do not appear as an option in the "update" variable option. As with traditional programming languages, a variable is generally available to all scripts included after its declaration. It would be helpful to be able to create a variable in recipe A, and have it available to included recipes without any additional declarations, input schema's, or anything of the sort. The scope would cascade down.
Secondly, having global variables available to all recipes within a project would be nice. I understand that becomes troublesome, because they may be running 2 different job IDs. A real sense of super globals would be great.
If I am completely off base, I would love clear documentation on using variables in Workato.
If I'm understanding it correctly, you'll need to pass the variable into the request payload of the child recipe and if you wish to return it back to the parent, you'll need to pass back a response for the synchronous child recipe. That's the best way to accomplish this today in Workato.
In terms of global variables, I've found account properties can act as a substitute for most cases if you're simply reading. For more info on Account Properties, please see our
docs. Lookup Tables could potentially be another option depending on how you wanted to use the variables you create.
Hope this helps!
Thank you Phil. I am aware of those options, I'm hoping for variables that act like variables in traditional programming languages. Without having to manually pass values in and out of recipes. Variables declared in a recipe being available to all child recipes after declaration.
After a conversation with some of the Workato folks, I realize this may not be possible, as each child recipe becomes it's own job independent of the others. That might making scoping very tricky, or impossible.
Send us a ticket, we will try our best to assist you with your problem