Difference between revisions of "Auto-Delete Dead Links"
m (NWE moved page DeadLink to Auto-Delete Dead Links) |
|||
| Line 1: | Line 1: | ||
| − | The Auto-Delete Dead Links feature | + | The Auto-Delete Dead Links feature can detect and remove dead links in {{UBIK}}. If enabled, the feature deletes unreachable links automatically when encountered. |
| − | == | + | == What is a Dead Link? == |
| + | Dead links are Guid property values without corresponding objects, with the consequence that a lot of time is spent looking up the non-existent object in the database when reading the property value as a {{UBIK}} object is attempted. A couple of such Dead Links can slow down a {{UBIK}} web service, Studio or Enterprise Service drastically, therefore they should be avoided or at least cleaned up as soon as possible. | ||
| − | + | == How to deal with Dead Links == | |
| + | * First of all, {{UBIK}} logs each encounter with a Dead Link (but only up to once per minute) as a warning including all relevant details like the owner ID, the property name and the faulty value. {{Version/ServerSince|4.9.0}} | ||
| + | * One can enable the auto-deletion of Dead Links in the System Settings. Then, in addition to writing a log entry, {{UBIK}} deletes a faulty value when it is encountered. {{Version/ServerSince|5.0.0}} | ||
| + | [[File:AutoDeleteDeadLinkMessage.png|200px|thumb|Notification displayed when a dead link is detected]] | ||
| + | * There is the possibility to actively find and delete dead links for all instances of a MetaClass. If you know that there are Dead Links, you can do a bulk clean-up that way. {{Version/ServerSince|5.0.0}} | ||
| + | |||
| + | The auto-deletion is not enabled by default because there can be use-cases where the data is legitimate but other issues lead to a failure to find the object. | ||
| + | E.g., timing issues during import or missing plugin DLLs in a setup. | ||
| + | |||
| + | == Enable Auto-Deletion of Dead Links in the System Settings {{Version/ServerSince|5.0.0}} == | ||
[[File:AutoDeleteDeadLinkSetting.png|200px|thumb|Auto-Delete Dead Links feature inside the System Settings]] | [[File:AutoDeleteDeadLinkSetting.png|200px|thumb|Auto-Delete Dead Links feature inside the System Settings]] | ||
* In [[UBIK Studio]], navigate to System Settings. | * In [[UBIK Studio]], navigate to System Settings. | ||
* Locate the setting Auto-Delete Dead Links. | * Locate the setting Auto-Delete Dead Links. | ||
| − | * Toggle the setting to enable | + | * Toggle the setting to enable or disable the feature. |
| − | === | + | == Actively delete Dead Links for a MetaClass {{Version/ServerSince|5.0.0}} == |
| − | + | This can be done from Who-Bert or custom code, or even via the {{UBIK}} Enterprise Service. | |
| + | <syntaxhighlight lang="csharp"> | ||
| + | MetaClass metaClassWithDeadLinks; // This should be a MetaClass where instances are known or suspected to contain Dead Links! | ||
| + | UBIKEnvironment environment = anyObject.Environment; | ||
| + | environment.UBIKDataFactory().CleanDeadLinks(metaClassWithDeadLinks); | ||
| + | </syntaxhighlight> | ||
| − | + | == See also == | |
| + | *[[UBIK_Studio_Basics#Database_specific_settings]] | ||
| − | + | [[Category:Version 4.9|Auto-Delete Dead Links]] | |
| − | + | [[Category:Version 5.0|Auto-Delete Dead Links]] | |
| − | + | [[Category:Server|Auto-Delete Dead Links]] | |
| − | + | [[Category:Studio|Auto-Delete Dead Links]] | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
Revision as of 12:56, 18 February 2026
The Auto-Delete Dead Links feature can detect and remove dead links in UBIK®. If enabled, the feature deletes unreachable links automatically when encountered.
Contents
What is a Dead Link?
Dead links are Guid property values without corresponding objects, with the consequence that a lot of time is spent looking up the non-existent object in the database when reading the property value as a UBIK® object is attempted. A couple of such Dead Links can slow down a UBIK® web service, Studio or Enterprise Service drastically, therefore they should be avoided or at least cleaned up as soon as possible.
How to deal with Dead Links
- First of all, UBIK® logs each encounter with a Dead Link (but only up to once per minute) as a warning including all relevant details like the owner ID, the property name and the faulty value.
- One can enable the auto-deletion of Dead Links in the System Settings. Then, in addition to writing a log entry, UBIK® deletes a faulty value when it is encountered.
- There is the possibility to actively find and delete dead links for all instances of a MetaClass. If you know that there are Dead Links, you can do a bulk clean-up that way.
The auto-deletion is not enabled by default because there can be use-cases where the data is legitimate but other issues lead to a failure to find the object. E.g., timing issues during import or missing plugin DLLs in a setup.
Enable Auto-Deletion of Dead Links in the System Settings
- In UBIK Studio, navigate to System Settings.
- Locate the setting Auto-Delete Dead Links.
- Toggle the setting to enable or disable the feature.
Actively delete Dead Links for a MetaClass
This can be done from Who-Bert or custom code, or even via the UBIK® Enterprise Service.
UBIKEnvironment environment = anyObject.Environment;
environment.UBIKDataFactory().CleanDeadLinks(metaClassWithDeadLinks);
