Overview
CK language 2 is an opt-in extension of the Construction Kit YAML language. A model that declares ckLanguage
Interfaces
An interface is a versioned contract that types implement. It names attributes, associations and methods a type must provide, without fixing the type's position in the inheritance hierarchy. Dependent models can then rely on "anything that is Named-1" instead of on a concrete type of another model — which is what keeps a change of that concrete type from cascading into every dependent.
Access Modifiers
CK language 2 adds three modifiers. All of them require ckLanguage: 2 (message 90 otherwise).
Write Restriction
A type can restrict who may write its runtime entities. With a writeAccess block, only the listed principal kinds and trusted service channels may create, update, replace or delete entities of the type, or change associations that have such an entity at either end. Everyone else is refused with message 144, and nothing is written.
Method Definitions
CK language 2 lets a type or an interface declare methods MethodOnly) and to replace ad-hoc REST endpoints.
Method Consistency Model
This page states what a method may assume about transactions, failures, ordering and repeated calls, and what the caller can rely on. It is the contract between the platform, the author of a method handler and the caller of a method. The practical how-to is in Implementing Method Handlers.
Implementing Method Handlers
A method is declared in a Construction Kit model. A handler is the code that runs when the method is called. This guide shows how to write one for each of the three ways a method can be handled, and which rules every handler follows. The consistency rules (transactions, failures, retries) are stated in the Method Consistency Model; read it first.
Pipeline Method Handlers
pipeline-method-handlers}
Method Metrics and Traces
method-metrics}
GraphQL Mapping
This page describes how CK language 2 elements appear in a tenant's GraphQL schema (asset repository): attribute access, CK interfaces as GraphQL interfaces, and the CK meta API.
Range Retention
Today a compiled model freezes every dependency range into an exact pin: System-2.5,3.0) in ckModel.yaml becomes System-2.5.0 in the compiled model, and a tenant must hold exactly that version (see [Versioning rules). Every new System version therefore forces every dependent to be rebuilt and republished.
Compiler Messages
The compiler and the engine report CK language 2 problems with the message numbers below (Error 112 types/types.yaml: ...). The same checks run when a compiled model is resolved — on publish and on import into a tenant — so a model that bypassed the compiler is refused as well. All messages are errors unless marked warning.