diff --git a/content/change-logs/analytics/apama-in-c8y-20251127-AB-Processing-DeiviceHirearchy-changes.md b/content/change-logs/analytics/apama-in-c8y-20251127-AB-Processing-DeiviceHirearchy-changes.md new file mode 100644 index 0000000000..53b7bbe194 --- /dev/null +++ b/content/change-logs/analytics/apama-in-c8y-20251127-AB-Processing-DeiviceHirearchy-changes.md @@ -0,0 +1,24 @@ +--- +date: 2025-11-26 +title: Analytics Builder models now detect hierarchy changes in groups and assets +change_type: + - value: change-QHu1GdukP + label: Feature +product_area: Analytics +component: + - value: component-M5-cepIIS + label: Streaming Analytics +build_artifact: + - value: tc-KXXmo2SUR + label: apama-in-c8y +ticket: APMF-94 +version: 26.260.0 +--- + +Analytics Builder models consuming data from device groups or assets now automatically detect hierarchy changes. This includes the addition, update, or deletion of devices, subgroups, and assets. The model dynamically adapts to these structural changes, ensuring continuous and accurate data processing. + +For details, refer to [Support for dynamic changes to group and asset hierarchy](/streaming-analytics/analytics-builder/#dynamic-hierarchy-changes). + +{{< c8y-admon-info >}} +This is also applicable to the [Smart rules plugin](/streaming-analytics/smart-rules-plugin#what-is-the-smart-rules-plugin). +{{}} diff --git a/content/streaming-analytics/analytics-builder-bundle/models-and-devices.md b/content/streaming-analytics/analytics-builder-bundle/models-and-devices.md index 30f821436a..2c4062ce3f 100644 --- a/content/streaming-analytics/analytics-builder-bundle/models-and-devices.md +++ b/content/streaming-analytics/analytics-builder-bundle/models-and-devices.md @@ -195,3 +195,19 @@ You can combine several values. For example, specify the following if you only w The default value of this tenant option is `not has(c8y_IsVirtualDevice)`. As long as you do not change this tenant option, virtual devices are not shown as they would not make sense in an analytic model. If you change the value for this tenant option, make sure to specify all managed objects that you want to see in the search result. See also [Configuration](/streaming-analytics/analytics-builder/#configuration). + +### Support for dynamic changes to group and asset hierarchy {#dynamic-hierarchy-changes} + +By default, input blocks in Analytics Builder now support dynamic changes to the group hierarchy. This includes the addition, deletion, and update of devices or assets, as well as structural changes within groups. Analytics Builder models automatically adapt to these changes, processing data based on the most current group or asset hierarchy. + +{{< c8y-admon-info >}} +This is also applicable to the [Smart rules plugin](/streaming-analytics/smart-rules-plugin#what-is-the-smart-rules-plugin). +{{}} + +**Key behavior and limitations** + +- *Deletion of source/target*: If a specific device, group, or asset configured as an input or output in the model is deleted, the deployed model will automatically transition to a FAILED state. +- *Empty groups*: If a monitored group becomes empty, the model remains in the ACTIVE state. It will resume processing data as soon as a new device, group, or asset is added to the group. +- *Nested & cascaded deletions*: Dynamic detection does not support the deletion of nested groups or the cascaded deletion of devices. In these scenarios, the model must be undeployed and redeployed to recognize the updated hierarchy. + +To enable this behavior for custom blocks, refer to the [Analytics Builder Block SDK documentation](https://cumulocity-iot.github.io/apama-analytics-builder-block-sdk/).