-
Notifications
You must be signed in to change notification settings - Fork 82
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
Provide ability to utlitize Flow Variables globally #257
Comments
This keeps coming up in complex flows. I have a flow now that would benefit greatly from having the ability to set or stamp flow variables that can be used by other components (specifically a bearer token that needs to be used by several web service callers throughout a flow). In a simple flow, it isn't bad to simply pass the variable along in message headers from component to component. However, there are still components that don't pass along message headers (like Temp RDBMS component) as they receive many messages inbound and create a completely different set of messages outbound. The passing along of message headers in these situations becomes confusing, and not sure it's the right thing to do. I think we need to be able to have all component runtimes have the ability to read/write from a set of global flow variables. They would need to be synchronized as threading would def. be an issue. I think we should be able to:
|
ComponentContext now has access to a synchronized map in FlowRuntime called flowVariables. flowParameters are still immutable. flowVariables can be set and read by different components in the flow. From script component: context.flowVariables.put(key,value) and variable replacement through AbstractComponentRuntime.resolveParamsAndHeaders now includes flowVariables as well. Will update stamp component in a different issue. |
Since Flow Parameters are immutable, would be nice to provide a way to create, use and update global variables within a flow.
The text was updated successfully, but these errors were encountered: