Last modified on 18 February 2026, at 16:39

Difference between revisions of "Auto-Delete Dead Links"

(See also)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
The Auto-Delete Dead Links feature automatically detects and removes dead links within UBIK Studio. When enabled, the system deletes unreachable links to reduce manual cleanup.
+
The Auto-Delete Dead Links feature can detect and remove dead links in {{UBIK}}. If enabled, the feature deletes unreachable links automatically when encountered.  
  
== Usage ==
+
== 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. In the Bulk Editor, a Dead Link is shown as an empty cell.
  
=== How to Enable It ===
+
== Avoiding Dead Links ==
 +
* Use {{UBIK}} References for links that might end up being Dead Links, because:
 +
** Knowing the target MetaClass reduces the time to detect a Dead Link
 +
** Knowing the Reference allows us to find relevant {{UBIK}} Properties more easily
 +
* After an object was deleted, make sure to clean up all Dead Links from other objects to it. Depending on the project and situation, in some cases this will be trivial, in other cases it will require an engineering effort.
 +
* {{UBIK}} will already prevent any Dead Links when importing via the Proxy mechanics; there's a Missing Proxy Link Management feature. {{Version/ServerSince|4.9.0}}
 +
* However, custom imports avoiding the Proxy mechanics do not have that luxury. Before bulk imports from large data sources, take some time to evaluate:
 +
** Am I going to import links between objects?
 +
** Is it possible or even likely that any of these links will be Dead Links?
 +
** Can I avoid them during the import?
 +
** If not, how can I clean up afterwards?
 +
 
 +
== Cleaning up 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|Log entry 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 the feature or Off to disable it.
+
* Toggle the setting to enable or disable the feature.
  
=== How It Works ===
+
== Actively delete Dead Links for a MetaClass {{Version/ServerSince|5.0.0}} ==
[[File:AutoDeleteDeadLinkMessage.png|200px|thumb|Notification displayed when a dead link is detected]]
+
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>
  
Once the feature is enabled, UBIK Studio automatically detects dead links when they are encountered. If a dead link is found, it is deleted immediately, and a notification message informs you whether the link was removed based on your current setting.
+
== See also ==
 +
*[[UBIK_Studio_Basics#Database_specific_settings|System Settings]]
  
The system saves this change automatically, ensuring the dead link does not reappear the next time you open UBIK Studio.
+
[[Category:Server|Auto-Delete Dead Links]]
 
+
[[Category:Studio|Auto-Delete Dead Links]]
 
+
[[Category:Version 4.9|Auto-Delete Dead Links]]
 
+
[[Category:Version 5.0|Auto-Delete Dead Links]]
 
+
== See also ==
+
*[[UBIK_Studio_Basics]]
+
*[[#Database specific settings|specific settings dialog for the currently connected database]]
+
*[[UBIK_Console]]
+
*[[UBIK_Actions]]
+

Latest revision as of 16:39, 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.

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. In the Bulk Editor, a Dead Link is shown as an empty cell.

Avoiding Dead Links

  • Use UBIK® References for links that might end up being Dead Links, because:
    • Knowing the target MetaClass reduces the time to detect a Dead Link
    • Knowing the Reference allows us to find relevant UBIK® Properties more easily
  • After an object was deleted, make sure to clean up all Dead Links from other objects to it. Depending on the project and situation, in some cases this will be trivial, in other cases it will require an engineering effort.
  • UBIK® will already prevent any Dead Links when importing via the Proxy mechanics; there's a Missing Proxy Link Management feature.
  • However, custom imports avoiding the Proxy mechanics do not have that luxury. Before bulk imports from large data sources, take some time to evaluate:
    • Am I going to import links between objects?
    • Is it possible or even likely that any of these links will be Dead Links?
    • Can I avoid them during the import?
    • If not, how can I clean up afterwards?

Cleaning up 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.
Log entry 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.

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

Auto-Delete Dead Links feature inside 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.

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);

See also