Skip to content

Features

Entitlement aggregate

IEntitlement / EntitlementEntity (one per tenant) with child collections:

  • IEntitlementAssignment / EntitlementAssignmentEntity - ProductId, EditionId, EffectiveFromUtc, EffectiveToUtc.
  • ITenantFeatureOverride / TenantFeatureOverrideEntity - FeatureKey, IsEnabled, Reason.

EntitlementStatusEnumeration: Draft/Active/Suspended/Decommissioned. Exceptions include EntitlementAlreadyExistsForTenantException, EditionAssignmentRequiresActiveEntitlementException.

Published events

Event Topic
EffectiveEntitlementsUpdatedEvent entitlements.v1.effective-entitlements-updated
FeatureOverriddenIntegrationEvent entitlements.v1.feature-overridden
AssignmentChangedIntegrationEvent entitlements.v1.assignment-changed

Consumed catalog events (reaction saga)

Consumes events from the NuGet-referenced ConnectSoft.Saas.ProductsCatalog.MessagingModel.Events:

Event Topic Handling
ProductRetiredEvent catalog.domain.v1.product-retired ProductCatalogReactionStateMachine -> ReactToCatalogProductRetiredAsync (closes assignments referencing the retired product)
ProductCreatedEvent catalog.domain.v1.product-created Topology-mapped only (no handler)
ProductUpdatedEvent catalog.domain.v1.product-updated Topology-mapped only (no handler)

Saga: ProductCatalogReactionStateMachine / ProductCatalogReactionState, correlated by ProductId, resolving IEntitlementsProcessor via IServiceScopeFactory.

Orleans

EntitlementEditorGrain (IEntitlementEditorGrain : IEntitlementEditorActor, keyed by tenant id) - covered by EntitlementEditorGrainSiloTests (Orleans TestCluster).

Metrics

EntitlementsMetrics - assign-edition, override-feature, and catalog-reaction counters.

See also