event

Revit Parameter Projection Demoted

An approved projection returned to `draft` because its shared-parameter-file output changed.

EventStatus: Implemented in api-v1

Purpose

Records approved → draft. Demotion is not a steward action with its own endpoint — it is an automatic consequence of an edit or a metadata resync that would change what the projection contributes to the shared parameter file. Re-review is required before it is approved again. It is a no-op when already draft and refused when archived.

Payload

Envelope is { name, occurredAt, payload } (apps/api-v1/src/modules/shared/domain/events/DomainEvent.ts). All seven RevitParameterProjection* events share one payload type; occurredAt appears both on the envelope and in the payload.

FieldTypeMeaning
projectionIdstringProjection domain_id
parameterKeyIdstringThe one canonical key this projection expresses
occurredAtDateWhen demotion happened

Raised by

  • RevitParameterProjection.demoteToDraftapps/api-v1/src/modules/bim-ontology/core/domain/revit/RevitParameterProjection.ts
  • The demoteApprovedIfSpfOutputChanged helper (core/application/use-cases/demoteApprovedIfSpfOutputChanged.ts), called from UpdateRevitParameterProjectionUseCase (RevitProjectionAuthoringUseCases.ts) and from ResyncDerivedProjectionMetadataUseCase (RevitProjectionDerivationUseCases.ts)
  • DemoteRevitProjectionsCoveringObjectClassUseCase after ObjectClassDemoted — covering approved projections return to draft for re-review
  • No operation demotes directly. It rides along with updateRevitParameterProjection, the resync operations, a ParameterGroupChanged / ParameterKeyUpdated resync, or an ObjectClass demotion cascade

Consumers

No subscriber in this module. No handler is registered for any of the seven projection events in bim-ontology.composition.ts; only the '*' DomainEventAuditLogger sees them.