Backfill Common Properties Data
Common properties are shared attributes applied to services and assets in Activate. They are evaluated and populated automatically based on object state and configuration. This document explains how common properties are updated and how to backfill them for existing objects when required.
How common properties are updated
For services and assets, common properties are updated when SetInfo() is called and one of the following conditions is met:
- The object is being inserted for the first time
- The object data has changed since the last update
If neither condition is met, common properties are not recalculated.
Backfilling common properties
In some scenarios, common properties may be missing for existing service or asset instances. This typically occurs when common properties were introduced or modified after the objects were originally created.
To backfill common properties, the object must be treated as changed before calling SetInfo().
Triggering a data change
A data change can be triggered by performing a dummy update. This is a non-functional change that ensures the object meets the data-changed condition required for common properties to be recalculated.
A common approach is to set a transient or placeholder value, such as a newly generated GUID, on the object before saving it.
Bulk backfill approach
To backfill common properties across multiple objects:
- Retrieve the required service or asset instances
- Apply a dummy update to each instance
- Call SetInfo() to persist the change and recalculate common properties
This process must be applied to all objects that require backfilled values.
Scope and impact considerations
When performing bulk backfills:
- Limit the scope to only objects that require updates
- Test the approach in a non-production environment first
- Be aware of the processing load when updating large numbers of objects
The same behaviour applies to both service instances and asset instances.