Created 11-29-2022 06:12 AM
Hi, I want ask a shared variable between non-associated Processors.
I have 2 separate Process Groups.
One group monitors the status of the API called log manager, and changes the variable 'Circuit_Break' to 'enable' through UpdateAttribute when the API status is bad.
Another group receives syslog as udp and put it in an API called log manager. At this time, if the variable called 'Circuit_Break' is 'enable' through RouteOnAttribute in the middle, alert with slack and try to execute ControlRate.
thisis Group 2
thisis Group 1
Is it possible to use variable shared by different process groups?
If not available, are there any other good ways?
I would like to periodically monitor the API and give a slight delay according to the API status.
When the API is in a bad state, I want to give it time to recover by adjusting the throughput(by ControlRate).
Created 12-05-2022 11:19 AM
You can create variables on a process group, those variables are then only available to that process group (scope) on which they were created.
NiFi documentation on Variables:
https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Variables
Variable shave been deprecated in favor of Parameter Contexts:
https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#parameter-contexts
You can create a single parameter context that you add parameters to and then associate the parameter context with multiple process groups. This will allow you to update a parameter in one parameter context and effectively update your flows in multiple process groups.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 12-05-2022 11:19 AM
You can create variables on a process group, those variables are then only available to that process group (scope) on which they were created.
NiFi documentation on Variables:
https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Variables
Variable shave been deprecated in favor of Parameter Contexts:
https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#parameter-contexts
You can create a single parameter context that you add parameters to and then associate the parameter context with multiple process groups. This will allow you to update a parameter in one parameter context and effectively update your flows in multiple process groups.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 12-06-2022 02:35 PM
@dreaminz Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks
Regards,
Diana Torres,