Cancel changes (CANCEL)
The cancel changes operator completely clears the current change session.
Clearing the session reverts every change accumulated in it: data property values (including local ones) go back to what they were at the start of the session, newly created objects disappear, and class changes of existing objects are undone.
As with other session management operators, you can explicitly specify nested local properties for the cancel operator.
This operator works differently if executed during an apply transaction — for example, inside the applied action or inside a global synchronous event handler. In that case, instead of clearing the session, it cancels the apply that is currently running.
Language
To declare an action that implements cancellation, use the CANCEL operator.
Examples
CLASS Sku;
in = DATA LOCAL BOOLEAN (Sku);
dropChanges() {
CANCEL NESTED (in[Sku]); // cancel all changes except the `in[Sku]` property
}