Function Processing Modes¶
The execution context allows to apply quality rules both to the whole entity/reference set attribute structure and to its separate parts, and is realized by 2 processing modes:
GLOBAL. Processing mode, when the function processes the port once, regardless of the size of the attributes collection it gets into.
LOCAL. Processing mode in which the function processes the port as many times as there are attributes in the collection.
Features of the execution context:
In GLOBAL mode, the function processes a port once, regardless of the size of the collection;
GLOBAL is the default mode;
LOCAL mode allows you to exclude from processing those attributes that might cause errors in the function's execution during attribute collection packing.
In LOCAL mode, the function processes the port as many times as the number of attributes were packed into the collection;
In LOCAL mode, ports can be selected either higher in structure or 1 level below the specified complex attribute;
Attributes selected above the context are direct ancestors of attributes (parents and grandparents) specified in the context;
Each standard data processing function supports one of the modes. A choice between modes is available for individual standard functions. Information about the processing mode is specified in the "Functions" section when selecting a standard function from the list;
When creating a composite function a choice of possible processing modes is available;
When implementing a third-party function, you also need to specify the value of the parameter that specifies the available processing modes;
Upath-expression, specified in the "Execution context" field must match the expressions of the incoming and outgoing ports.
GLOBAL Processing Mode¶
In GLOBAL mode, the entity name is specified as the execution context value. Any ports at any level of nesting can be selected.
GLOBAL mode implies that attributes at any level of nesting can be selected in the input and output ports. Launching and filtering will be performed depending on the records of the selected complex attribute or top level record.

Figure 1. GLOBAL Processing Mode
LOCAL Processing Mode¶
In LOCAL mode, a complex attribute (labeled 2.1.2 in Figure 2) is specified as the execution context value.
The LOCAL mode limits the port selection within one branch of the structure. In this case, if level 2 nesting is specified in LOCAL mode, port selection below level 3 is not available and will result in an error.
The function will be run for all records of the selected complex attribute.
Notes:
If the function processes incoming ports of types - integer, string, numeric, date, date/time, time, logical - then only simple attributes of the selected complex attribute, or simple attributes of parents and progenitors, can be included in the incoming and outgoing ports of the rule.
If the function handles incoming ports of types - any, record - then a complex attribute can be selected.
Regardless of the port type - you cannot select an attribute from another branch or attribute highlighting. Top-level records can also be used, subject to any restrictions.
Restrictions:
There are limitations to the data processing functions in Universe MDM that the use of LOCAL mode solves:
Certain functions (e.g., arithmetic) do not support lists of values in the incoming ports, but may be configured in such a way that errors occur;
Outgoing ports may contain inconsistent and inconsistent results of function runs;
A function may fail to take into account the filling of attributes at all nesting levels of the entity, which also leads to errors during execution.

Figure 2. LOCAL Processing Mode