Breyta

Deila með


Include filtering attributes with plug-in registration

Category: Performance

Impact potential: Medium

Symptoms

If no filtering attributes are set for a plug-in registration step, then the plug-in executes every time an update message occurs for that event. A combination of no filtering attributes and auto-save functionality could lead to unnecessary plug-in executions causing undesirable behavior and degrade performance.

Guidance

Most plug-ins registered for an entity's update message don't need to execute on all updates. Usually, there's only a need to process certain logic when a specific attribute or attributes change. In order to prevent extra processing in the environment, minimize the logic needed in a plug-in and allow the update to complete as quickly as possible. Including filtering attributes for all update step registrations is highly recommended.

Plug-in Registration Step with Filtering Attributes.

Additional information

Filtering attributes are a list of entity attributes that, when changed, cause the plug-in to execute. These attributes can be set when registering the plug-in using the Plug-in Registration tool. If no attributes are set, then the plug-in executes every time an update message occurs. Updates can occur for various reasons. When auto-save is turned on in the environment, it can occur multiple times during the session of user when on an entity form. If filtering attributes aren't specified, then the plug-in executes for any attribute change to the designed entity.

See also

Register a plug-in
Disable auto-save in a model-driven app