Engine

1.3. What happens on a write🔗

A client appends events; the engine stores an event if it fits its event type and every rule accepts it, and otherwise rejects it with the reason. On the folio, with the events sent one after the other (rule 1 is the only rule):

Event sent

Answer

Claim

FolioOpened

accepted

Opening a folio is accepted.

ChargePosted of 12.50

accepted

A charge on an open folio is accepted.

FolioClosed, then a ChargePosted

the charge is rejected by rule 1

A charge on a closed folio is rejected.

FolioClosed again

rejected by rule 1

Closing a folio twice is rejected.

How a write is checked and stored is on Appending.