Subscriptions
1. Overview / Introduction
Subscriptions are a foundational capability of the SBE platform. At a high level, subscriptions act as mechanisms for tracking and responding to updates in the digital thread. They help ensure that other items from external systems stay synchronized and can react to changes. This resource is critical for implementing event-driven architecture across the platform. Functionally, they operate by copying models from a source partition or entity set into another, scoped by the subscribing channel.
2. Conceptual Role
Subscriptions address the challenge of maintaining consistent and current data across distributed systems. They enable reactive behaviors based on defined conditions. Conceptually, they serve as observers or listeners within the system's data.
3. Design Rationale
Subscriptions are built for flexibility, scalability, and clarity. They support:
Evaluation of logical expressions (e.g., based on attributes, links, and class properties).
Scoping via partitions to limit evaluations to targeted segments.
Integration with provenance systems to support traceability.
Key design trade-offs include managing performance under frequent updates and maintaining clarity when numerous subscriptions are in place. Over time, the system has evolved to support version-based evaluation and configuration-aware processing.
4. Relationship to Other Resources
Subscriptions interact closely with several platform components:
Expressions define the conditions that bring models into subscriptions
Origin set is the branch that defines the authoritative representation of the models in the digital thread
Clone set is the branch that defines the subscribed representation of the models in the digital thread
Subscriptions function as both consumers (listening for changes) and orchestrators (triggering downstream behavior), making them key in inter-service workflows.
5. Conceptual Usage Patterns
Common subscription usage includes:
Initial data loading via baseline subscriptions.
Automated updates in response to lifecycle changes.
Archiving during version freezes.
Subscription Types
Lifecycle Subscriptions: Track explicitly selected models.
Entity Set Subscriptions: Track all models within a designated entity set.
Origin Subscriptions: Similar to lifecycle subscriptions, but initialize via origin search.
Search Subscriptions: Dynamically track a filtered subset of models based on a search expression. These update automatically as models enter or exit the search result.
Diff/Merge Integration
Diff/Merge is tightly coupled with subscriptions. This functionality gives users the ability to see what changes have happened in the authoritative model and optionally apply those changes to their subscription. It is not required to accept these changes reducing chances of unexpected changes to data giving users more control. Changes can also be applied from the subscription to the authoritative branch as well.
6. Common Pitfalls, Misunderstandings, and Troubleshooting
Frequent Challenges:
Over-triggering: Subscriptions that are too broad can cause excessive updates.
Subscription Metadata Management:
External tools integrating with subscriptions must return a correlation ID per model and store the subscription ID.
Models published without a subscription ID and unknown correlation ID are considered authoritative, potentially overriding intended logic.
Any models missing from the external tool during refresh or publish are archived from the external tool or digital thread. This can include items that were included, but had mapping errors causing it to not be included in the transformed set of data.
Troubleshooting Tips:
Validate the expression are correct, and expected models are present
Confirm the correct configuration context is correct
Use audit logs to trace operations and transformed data