Determining the technical priority for an object

The way that the technical priority of an object is determined was changed in FTM Core. However, you might not want to convert all of your code to use this new priority event API, but target your conversion to only specific areas of your code. To help you with this situation, an algorithm is provided for you to use to offload the determination of the technical priority for an object to the FTM Core.

When event prioritization is enabled, this algorithm is run in the following situations.
Any new priority event API method is called.
When NULL is passed as the Priority parameter, the algorithm is used to figure out a technical priority.
Existing event API methods are called.
The Priority parameter is ignored and the algorithm is used to figure out a technical priority.
The algorithm consists of the following fallbacks to determine a technical priority:
  1. The algorithm looks for a transition object and uses its technical priority, if it is available.
  2. The name and weighted priority of the parent event is cached on the environment. The weighted priority is used in the calculation formula to retrieve the technical priority of the object.
  3. The default technical priority value of the application is used.

In all of these cases, the technical priority that is determined is cached on the environment to improve performance and efficiency. The caching is done because all objects that are being processed in the unit of work have a high probability of having the same technical priority. As such, it is unnecessary to run the algorithm for each of these objects when the cached technical priority is readily available.