-
Notifications
You must be signed in to change notification settings - Fork 0
Domain
After any metadata, the first thing an xsm file must declare is the domain that owns the state model.
domain Elevator Management
The grammar is:
domain_header = "domain" SP name EOL*
So we have the keyword domain, exactly one space, and then the domain name.
Note that this is looser than the corresponding line in the xcm class model language, which requires an all caps alias after a comma. Here there is no alias — just the full domain name. The name must match the domain name declared in that domain's class model, since the state model's events, classes and relationships are all resolved against it.
Unlike a class model, a state model is not scoped to a subsystem. There is no subsystem line. A state
model belongs to the domain, and the class or relationship it describes is found wherever it happens to be
defined within that domain.
The next line declares whether this is a lifecycle or an assigner. See Lifecycle vs Assigner.
Copyright 2023-2026 © Leon Starr under MIT Open Source License