Parameter Key Archived
A ParameterKey was archived; the linked Revit projection is archived with it, never deleted.
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).
| Field | Type | Meaning |
|---|---|---|
parameterKeyId | ParameterKeyId | Key that was archived |
archivedAt | Date | When 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.archive—apps/api-v1/src/modules/bim-ontology/core/domain/parameter-key/ParameterKey.ts. Idempotent: already-archived emits nothingArchiveParameterKeyUseCase.archiveParameterKey—apps/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.
Related
- ParameterKey, RevitParameterProjection
- RevitParameterProjectionArchived
- RevitParameterProjectionReused — how the archived projection comes back