The resource that has the highest priority gets allocated first.
If their priorities are equal, check if they are already running. The resource that has the highest score on the node where it’s running gets allocated first (to prevent resource shuffling).
If the scores above are equal or they are not running, the resource has the highest score on the preferred node gets allocated first.
If the scores above are equal, the first runnable resource listed in cib gets allocated first.