-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable access from index.js #118
Comments
Of course.
let variables = {
db: 'value',
secret: 'value'
};
// Global shared variables
for (let key in Flow.instances) {
let instance = Flow.instances[key];
instance.variables2(variables);
}
// Private variables per Flow
for (let key in Flow.instances) {
let instance = Flow.instances[key];
instance.variables(variables);
} |
Thank you , that was fast! |
Follow up on this, currently if you write to a variable using variables or variables2, this will disable saving. the code is pretty simple:
Also, How would i go about knowing when the Flow is saved. i tried using
but nothing prints. Thanks again! |
Here: https://github.com/totaljs/flow/blob/master/definitions/flowstream.js#L13 Flow.on('save', function(schema) {
// @schema {Object} with FlowStream data
}); |
I wanted to know if there was a way to update the Global Variables from the root Program?
Thanks!
The text was updated successfully, but these errors were encountered: