Skip to main content
Version: 2.4

Entity Instance and Configuration

EntityInstance and EntityInstanceConfiguration are the core runtime objects of tSM inventory.

  • EntityInstance is stable identity (business key and type).
  • EntityInstanceConfiguration is the time-aware runtime snapshot linked to a catalog specification.

This document starts with business semantics and then provides field-level references based on inventory public DTOs.


1. Business Meaning

1.1 What an Entity Instance Represents

An EntityInstance is a durable runtime identity for one real business/technical object, for example:

  • one customer-facing service,
  • one product subscription,
  • one physical or logical resource.

Key intent:

  • keep one stable identity across lifecycle changes,
  • separate user-facing key (key) from internal UUID (id),
  • maintain pointers to the currently effective and prepared-next configuration.

1.2 What an Entity Instance Configuration Represents

An EntityInstanceConfiguration is a versioned runtime state of an instance.

Key intent:

  • bind runtime state to design-time definition (entityCatalogSpecificationId),
  • store dynamic operational data in chars,
  • capture time validity in validFor,
  • support rollout states (CURRENT, PENDING, HISTORY, DRAFT).

1.3 Design-to-Run Anchor

A configuration cannot be modeled in isolation from design-time definitions:

  • entityCatalogSpecificationId binds runtime to a catalog specification,
  • relationship consistency is enforced through relationship identifiers in a dedicated entity (covered in next document).

This is the main mechanism that keeps catalog design and inventory runtime synchronized.

1.4 Timeline Semantics

tSM uses active to represent runtime timeline priority:

  • CURRENT priority 0,
  • PENDING priority 1,
  • HISTORY priority 2,
  • DRAFT priority 3.

Why CURRENT is first:

  • most operational reads ask for the effective runtime state, not full historization,
  • priority sorting can return the expected answer quickly without additional timeline logic,
  • this supports practical queries like: "Give me the service, I do not mind historizations."

In other words, priority is an optimization for business-first retrieval of the active state.

Typical operational rule set:

  1. one active current configuration per instance,
  2. optional pending configuration for prepared changes,
  3. older current versions become history after activation of pending.

1.4.1 Historization Timeline Example

Legend:

  • done bar = HISTORY
  • active bar = CURRENT
  • crit bar = PENDING

Notes:

  • 2025-09-17 is the modeled "today" split point in this example.
  • "Open-end" validity is rendered as a long future date (2026-12-31) because Mermaid Gantt requires finite interval boundaries.

Detailed interpretation:

  1. PRD-INET-001 - Internet Service
  • One service instance with sequential versions.
  • 20 Mbit/s and 40 Mbit/s are historical.
  • 60 Mbit/s is the currently effective runtime version.
  • 100 Mbit/s is prepared as pending future change.
  1. RES-CPE-001 / DISC-001 - CPE and Discount
  • Resource/cost lane linked to the same commercial context.
  • Antenna remains active.
  • Discount -300 ended and moved to history.
  1. PRD-INET-001 - Wifi Branch
  • Child branch under the same service context.
  • Wifi and Extender are active branch components.
  1. PRD-TV-001 - TV Service
  • TV Basic is currently active runtime service line.
  • Cancelled is pending termination intent, prepared but not yet cut over as final state.

How to read CURRENT and PENDING overlap:

  • Overlap means next configuration is prepared while current remains effective.
  • This supports controlled cutover windows and rollback-safe execution.
  • Operational query "give me service now" returns CURRENT; planning/cutover query includes PENDING.

1.5 TM Forum Concept Mapping (High Level)

tSM entityTMF concept alignment
EntityInstance + EntityInstanceConfiguration with type SERVICETMF638 Service
EntityInstance + EntityInstanceConfiguration with type PRODUCTTMF637 Product
EntityInstance + EntityInstanceConfiguration with type RESOURCETMF639 Resource

TMF payload projection rules are documented in the dedicated TMF mapping page.

1.6 Why This Model Works

  • preserves stable runtime identity,
  • supports controlled future-dated changes,
  • keeps dynamic attributes extensible without schema branching,
  • allows one shared inventory engine for multiple runtime domains.

2. Structural Behavior and Rules

  • EntityInstance.key is the readable ID for users and operators.
  • EntityInstanceConfiguration.key and type are read-only mirrors from the linked instance.
  • EntityInstanceConfiguration.status is governed by EntityInstanceConfigurationStatus code table.
  • EntityInstanceConfiguration.parentEntityInstanceId models runtime tree parent linkage.

2.1 Current/Pending Pointer Behavior

EntityInstance has dedicated pointers:

  • currentEntityInstanceConfigurationId,
  • pendingEntityInstanceConfigurationId.

These pointers are a deliberate denormalization of the runtime model:

  • they allow very fast "effective state" reads for UI/API use cases,
  • they reduce the need to scan or sort all configurations during common operations.

The same result is still derivable without pointers by filtering configurations, for example:

  • by entityInstanceId,
  • by active = CURRENT (or PENDING),
  • and optionally by validity interval.

So pointers optimize read-paths, while canonical history remains in configuration records.

2.2 Tree Query Behavior

Inventory client exposes a tree search (findTree) pattern that:

  • starts from filtered nodes,
  • climbs to active roots,
  • returns active-filtered subtree.

This behavior is useful for service decomposition views and impact analysis.

2.3 TM Forum References


3. Entity Reference: Entity Instance (EntityInstance)

FieldTypeRequiredRead-onlyDescription
idUUIDNoNoInternal primary key. Client may provide UUIDv4 or let tSM generate.
typeStringYesNoInventory domain type (for example SERVICE, PRODUCT, RESOURCE).
keyStringNoNoBusiness-readable identifier shown to users.
dataTagsList<String>NoNoOptional labels/tags.
currentEntityInstanceConfigurationIdUUIDNoNoPointer to current configuration ID.
pendingEntityInstanceConfigurationIdUUIDNoNoPointer to pending configuration ID.

3.1 Enum Reference: EntityInstanceActiveEnum

ValuePriorityMeaning
CURRENT0Effective runtime configuration.
PENDING1Prepared configuration waiting activation.
HISTORY2Historical superseded configuration.
DRAFT3Draft configuration state for preparation.

4. Entity Reference: Entity Instance Configuration (EntityInstanceConfiguration)

FieldTypeRequiredRead-onlyDescription
idUUIDNoNoConfiguration primary key.
keyStringNoYesDerived from linked EntityInstance.key.
typeStringNoYesDerived from linked EntityInstance.type.
nameStringYesNoHuman-readable configuration name.
statusStringYesNoLifecycle status code (FK EntityInstanceConfigurationStatus.code).
customerIdUUIDNoNoOptional linked customer ID.
accountIdUUIDNoNoOptional linked account ID.
charsTsmCharsNoNoDynamic configuration attributes (JSON object).
crmAddress1IdUUIDNoNoOptional CRM address 1.
crmAddress2IdUUIDNoNoOptional CRM address 2.
activeEntityInstanceActiveEnumNoNoRuntime timeline state (PENDING default).
dataTagsList<String>NoNoOptional labels/tags.
entityCatalogSpecificationIdUUIDYesNoDesign-time specification reference from catalog.
entityInstanceIdUUIDNoYesLinked instance ID (server-managed binding).
location1IdStringNoNoOptional place/location reference 1.
location2IdStringNoNoOptional place/location reference 2.
parentEntityInstanceIdUUIDNoNoParent instance reference for runtime tree hierarchy.
validForTimePeriodAltNoNoValidity interval of this configuration.
entityInstanceEntityInstanceNoNoExpanded instance object when requested.
customAnyNoYesAdditional read-only properties from indexed document.
keyNormalizedStringNoYesOptional normalized key for sorting/searching.
descriptionStringNoNoConfiguration description.
whenInsertedDateNoYesLegacy audit timestamp helper.
lifecycleStringNoYesLifecycle policy state (read-only).
removalTimeDateNoNoOptional planned/recorded removal timestamp.

5. Status and Cost Governance

Status and cost are supporting models tightly connected to configuration lifecycle.

5.1 Status Governance

EntityInstanceConfigurationStatus is a configurable code table used by EntityInstanceConfiguration.status.

Important distinction:

  • active (CURRENT, PENDING, HISTORY, DRAFT) controls timeline position,
  • status (ACTIVE, CANCELLED, SUSPENDED, TERMINATED, and custom additions) controls business/operational lifecycle meaning.

This separation allows scenarios like:

  • pending configuration with status ACTIVE prepared for activation date,
  • current configuration with status SUSPENDED.

5.1.1 Entity Reference: EntityInstanceConfigurationStatus

FieldTypeRequiredRead-onlyDescription
idUUIDNoNoStatus record primary key.
codeStringYesNoTechnical status code (unique, API-safe identifier).
nameStringYesNoUser-facing status label.
validityFromDateNoNoValidity start.
validityToDateNoNoValidity end.
descriptionStringNoNoStatus description.
localizationDataLocalizationDataNoNoLocalized labels and descriptions.
typeEntityInstanceConfigurationStatusTypeEnumYesNoCoarse status type classification.
dataTagsList<String>NoNoOptional labels/tags.
configMap<String, Any?>NoNoAdditional status configuration payload.

5.1.2 Enum Reference: EntityInstanceConfigurationStatusTypeEnum

ValueMeaning
ACTIVEOperationally active status family.
CANCELLEDCanceled state family.
SUSPENDEDSuspended state family.
TERMINATEDTerminated state family.

5.2 Cost Modeling

EntityInstanceConfigurationCost stores per-configuration cost records linked to catalog specification references.

Typical use:

  • price snapshoting of runtime composition,
  • cost breakdown per configuration item,
  • feed for billing/revenue/cost analysis pipelines.

5.2.1 Entity Reference: EntityInstanceConfigurationCost

FieldTypeRequiredRead-onlyDescription
idUUIDNoNoCost record primary key.
entityInstanceConfigurationUUIDNoNoLinked configuration ID.
entityCatalogSpecificationIdUUIDYesNoLinked catalog specification ID.
quantityIntNoNoQuantity.
individualPriceBigDecimalNoNoUnit price value.
descriptionStringNoNoOptional tooltip/description.
lifecycleStringNoYesLifecycle policy state (read-only).
removalTimeDateNoNoOptional removal timestamp.

5.2.2 Cost Example

{
"entityInstanceConfiguration": "6fa0778f-d780-4d89-9c8f-95d4fd7b2f8d",
"entityCatalogSpecificationId": "8bde2bfa-2de1-4775-9954-c48ef49ae89b",
"quantity": 1,
"individualPrice": 29.90,
"description": "Monthly recurring charge for monitoring add-on"
}

5.2.3 Operational Recommendations

  1. Keep status table business-owned and versioned with validity windows.
  2. Treat active and status as separate dimensions in filters and dashboards.
  3. Keep cost entries linked to the same catalog specification IDs used in configuration records.
  4. Expose cost data through controlled APIs when financial consumers need runtime decomposition pricing.

6. Event Reference

EntityInstanceConfigurationCreateEventAfter is emitted after configuration creation and carries:

  • entityInstanceConfigurationId,
  • catalogSpecificationId.

Use this for asynchronous follow-up actions (for example orchestration kickoff, synchronization, enrichment).