event

Class Parameter Assigned

A ParameterKey was directly assigned to an ObjectClass.

EventStatus: Implemented in api-v1

Purpose

Records a new direct ClassParameter binding — a steward saying “this class has this parameter”. ClassParameter.bind always creates with assignmentOrigin: 'direct'; rendered (inherited) rows are materialized by the template sync, not by this event.

Assignment changes which object classes contribute to a Revit projection’s derived category set, which is why the projection side listens.

Payload

Envelope is { name, occurredAt, payload } (apps/api-v1/src/modules/shared/domain/events/DomainEvent.ts). All four ClassParameter* events share one payload type.

FieldTypeMeaning
classParameterIdClassParameterIdThe assignment record
objectClassIdObjectClassIdClass the parameter was assigned to
parameterKeyIdParameterKeyIdCanonical key being assigned
allowedValueCountnumber (optional)Only populated on ClassParameterAllowedValuesReplaced

Raised by

  • ClassParameter.bindapps/api-v1/src/modules/bim-ontology/core/domain/class-parameter/ClassParameter.ts
  • UpsertClassParameterUseCase.upsertClassParameterapps/api-v1/src/modules/bim-ontology/core/application/use-cases/ClassParameterUseCases.ts. BulkAssignClassParametersUseCase loops over the same use case
  • HTTP: upsertClassParameter, assignClassParameters

Consumers

Two handlers in adapters/inbound/events/, both registered in bim-ontology.composition.ts:

HandlerEffect
ClassParameterDerivedRevitCategoryHandlerPersistDerivedRevitCategorySetsUseCase for the event’s parameterKeyId — refreshes which classes contribute to the key’s Revit projection
RenderedParamTemplatesSyncHandlerSyncObjectClassRenderedParamTemplatesUseCase for the affected class subtree — re-materializes inherited assignments