Annotation Examples

Constraint Modeling Language (CML) annotations are labels that you add to parts of a model, such as types, variables, relationships, and constraints. Annotations control how these elements are shown and how they behave in the configurator. Annotations help fine-tune the configurator and the constraint engine without changing the actual structure of the model.

The examples explain what each annotation does, where it can be used in the model, what kinds of values it supports, and how it behaves when the configurator runs and evaluates constraints. CML code samples show how the annotation works in practice.

  • closeRelation Annotation

    closeRelation is a CML annotation that controls addition of new line items to the relationship by the engine.

  • configurable Annotation

    configurable is a CML annotation that controls whether a model element can be configured.

  • defaultValue Annotation

    The defaultValue annotation is used on a variable to define the value it should start with when configuration begins.

  • domainComputation Annotation

    domainComputation is a CML annotation that specifies how the domain of a model element is determined, either by using a fixed domain or by computing the domain dynamically during configuration.

  • guardrails Annotation

    guardrails is a CML annotation that prevent the constraint engine from changing specified attributes or relations when it resolves the constraint.

  • peelable Annotation

    The peelable annotation is used to create soft selection values and allow the engine to modify these selections to satisfy a constraint.

  • productField Annotation

    productField is a CML annotation that defines the Product2 field on a variable. productField loads the value from Product Catalog Management (PCM) during constraint model activation.

  • propagateUp Annotation

    propagateUp is a Constraint Modeling Language (CML) annotation that controls aggregation propagation between children and parent elements.

  • relatedAttributes Annotation

    relatedAttributes is a Constraint Modeling Language (CML) annotation that resets the domain to the original one for domainComputation.

  • sequence Annotation

    The sequence annotation defines the execution and configuration order of elements in a Constraint Modeling Language (CML) model.

  • split Annotation

    split is a Constraint Modeling Language (CML) annotation that specifies whether the instances of the type should be split or not.