I need to fix an issue for a service protocol. The protocol starts with collecting all the profile definitions, instances, ... and stores them in a drop down menu + table. However at the restart of Dataminer, the drop down menu + table remains empty. Personally, I think is caused by a race condition: Dataminer starts the protocol before the profile definitions are (fully) loaded/available. The profile definitions are collected via the ProfileHelper
[Questions]
- Do you think that mine thought/statement is correct? Or is that Dataminer wise impossible. (I didn't find information of the process restart order.)
- If mine statement is correct, do you know how I can check if the profiles are available.
Thanks in advance!
For your first question, and as Peter mentioned, it is possible that what you are experiencing is a race condition.
But to answer your second question, could a timer-based approach solve your problem?
If you implement a timer that periodically reads all the profile definitions, instances, ... you would get it to fill in your tables once every module is available and it would also account for modifications that are done during the time the element is running.
It would still be helpful to be able to poll immediately after the module is available, but this could at least mitigate your problem.
First of all, thank you for your time (both João and Peter). I was hoping that I could check a flag (or something similar) but a timer-based approach did solve my problem just fine. Thanks again!