Hi.
What is the priority of customer orders (execution of automation script) versus customer orders using the protocol versus polling?
Kind Regards
Hello,
I will keep my answer (for now) on high level as this could go very deep into the logical flow of how things operate. I don't think this is what you need.
In general: priority of getting the outcome of the logic you want to run, either via automation or protocol, all depends on the behavior that was written in the logic.
E.g. starting the logic could be done right away, but the outcome could take some time.
Automation scripts and Protocols are running in 2 different entities.
This means they can run separately from each other. I state can because it is possible to build a setup in such a way that they need to interact and are dependent from each other.
When executing a script: e.g. to calculate something it will run right away: read as soon as possible to launch this script. e.g. if this script already runs and it was configured to block any other to run at the same time, your request will wait until the 1st was finished. But in overall it will run as soon as you execute it.
When pressing a button or setting a value in an element card that runs a protocol, the behavior will it will depend on the logic in the protocol: the click will be seen right away: again read 'executed as soon as possible'. The logic in the protocol could execute the goal of the button right away or it could add it to an internal protocol queue. Adding on this internal queue could be done "on top" or "at the end", it is even possible to state that it should be added after the "already requested polling to do's".
So what is the polling in a protocol: a Timer thread will add to do's at the end of the internal queue. When there is nothing on the queue, it will get executed right away. In between this polling time and before all the polling to do's are executed, we can add other like the click on a button as mentioned before.
very high level you can state:
- Starting a automation script is done right away
- Starting logic on a click / set in a protocol is either done right away (parameter running a qaction) or it is added to an internal queue (order dependent to protocol logic)
- Protocol polling is added to the internal queue at a defined frequency.