event

Parameter Key Archived

A ParameterKey was archived; the linked Revit projection is archived with it, never deleted.

EventStatus: Implemented in api-v1

Purpose

Retires a key from active or approved. Archived has no forward transition — only reinstate() returns it to draft. The consequence that matters downstream is that the key’s Revit projection is archived too, so the shared parameter GUID survives and can be reused if the key comes back.

Payload

Envelope is { name, occurredAt, payload } (apps/api-v1/src/modules/shared/domain/events/DomainEvent.ts).

FieldTypeMeaning
parameterKeyIdParameterKeyIdKey that was archived
archivedAtDateWhen archival happened; part of the handler’s idempotency key

The smallest payload in the module — the handler re-reads whatever else it needs.

Raised by

  • ParameterKey.archiveapps/api-v1/src/modules/bim-ontology/core/domain/parameter-key/ParameterKey.ts. Idempotent: already-archived emits nothing
  • ArchiveParameterKeyUseCase.archiveParameterKeyapps/api-v1/src/modules/bim-ontology/core/application/use-cases/ParameterKeyAuthoringUseCases.ts
  • HTTP: archiveParameterKey

Consumers

ArchiveRevitProjectionOnParameterKeyRetirementHandler (adapters/inbound/events/), registered in bim-ontology.composition.ts, calls ArchiveRevitParameterProjectionUseCase. For this event the archive decision is unconditional — unlike the ParameterKeyUpdated path, the handler does not re-read the key’s status first. It is a no-op when no projection is linked or the projection is already archived.

The same handler instance is registered for ParameterKeyUpdated, where the decision is conditional.