Hi everyone,
In an HTTP-based DataMiner connector, is it possible to control the polling interval of a group using a write parameter?
The group contains one or more HTTP sessions, and I would like the user to define the polling interval through a write parameter.
What would be the recommended way to implement this?
Hi Miguel,
Thanks for the link! In this case, I’m specifically looking to set a dynamic timer via a write parameter — for example, allowing the user to input a value or select from a dropdown (e.g., 15 min, 30 min, 1 hour), and have that control the polling interval of a specific group from the Dataminer UI.
So instead of changing the element’s overall polling speed, I want to control when a particular group (which contains HTTP sessions) is triggered to poll.
Is there a recommended approach for implementing group-based dynamic polling like this?
Best regards,
Deema
Hi Deema,
This can be achieved but it will require some custom logic.
The basic principle is to leverage a "regular" fixed timer and a counter.
You would:
- Create a timer and define its interval. The interval should be defined so that the user can configure the desired granularity (i.e. if you want to be able to tweak it down to the second level you should define a 1-second timer, otherwise you can define a 1-minute timer.
Note: do not forget to add the fixedTimer attribute to keep this timer always running correctly. - Add a "counting" group to the timer.
This group will execute actions that decrement a counter until it reaches zero
Note: Using the Thread feature will prevent the accuracy of your timer from being impacted by other operations running in your connector. - Create the necessary auxiliary parameters to allow for the counting and configuring of the timer base.
- Create a trigger on change of the auxiliary counter parameter that with the help of conditions will detect when the counter reaches zero and add the "regular" polling group to the queue as well as reset the counter.
It does require a bit of effort to implement but should achieve exactly what you need.
Hi Deema,
Before to implement this feature in the connector, can you double check if updating the timer base will cover your use case?
https://docs.dataminer.services/user-guide/Basic_Functionality/Elements/Working_with_elements/Changing_the_polling_speed_of_an_element.html