Remote / An event-sourced domain behind Remote
Three ways a Command meets a declared write
- Lower a declared write (
Lower.write). The declaration runs inside the Aggregate'sdecide, and the page predicts from that same declaration. Use it when the write fits one Aggregate and you want the rules stated once. - Bind a Command you wrote (
DomainRemote.command). Yourdeciderules. If the page's mutation is aMutation.write, the page predicts from a second statement of the rules, whichLaw.checkcompares with the first. Use it when the model already exists, ordecidedoes more than a declared write. - Import a Command (
Imported.mutation). Yourdeciderules, and the page predicts nothing: the mutation carries only a footprint of the fields it touches. Use it when the page only needs to send the Command.
The rest of this guide lowers one write, because that is where the declared domain and the Domain model meet most closely.