Hi,
We would like an Automation script to be able to receive feedback on an Element.SetParameter method, as we sometimes are not seeing that the SetParameter has been successful in terms of updating the API on the target Element.
We are assuming that the SetParameter successfully calls a QAction in the protocol that serializes the table to send to the IP endpoint via an http Session. There is also another Session called from a timer that updates the protocol tables that we can use to verify that the SetParameter has worked.
Without waiting for the 'check' Session to run, is there a method to immediately run a check after set without writing this into the protocols QAction, running a little Thread.Sleep() then checking the set has been successful is not ideal though.
Can an Automation script call a SetParameter Asynchronously and Wait for the Async task to complete, or is SetParameter always synchronous from the scripts point of view?
Are there any inbuilt event handlers in a script object that could be called from a protocol?
Best regards.
Jon
Hi Jon,
Element.SetParameter will, by default (unless you define engine.SetFlag(RunTimeFlags.NoCheckingSets) in your script), check if the set as successful or not.
Though this only check the value in the parameter itself, doesn't really apply for you.
For your case, you will indeed need to make a Thread.Sleep() and then check if the action was successful or not.