-
Notifications
You must be signed in to change notification settings - Fork 0
Deletion states
A born and die lifecycle is defined on a class whose instances are created and deleted during runtime.
In the Elevator Management domain, an instance of a Transfer class is created when a Cabin is dispatched and deleted when the transfer is complete. So its lifecycle specifies a deletion state.
A Deletion State is specified by adding the !* symbol after the name in the state's header line.
state Delete !*
activity
Transfer completed -> R53( Shaft )
--
The grammar:
state_header = "state" SP state_name signature? (SP DELETION)? EOL*
DELETION = r'!\*'
Don't forget the required space before the symbol.
If the state specifies a signature, the symbol appears after the signature (see Signatures):
The model execution platform automatically deletes the instance once the state activity completes. Consequenlty, a deletion state has no Transitions as there is nothing left to transition.
The Transfer example above one last event to the R53 assigner on its way out, telling it that the transfer is finished and the shaft is free, and then the Transfer instance is gone.
Copyright 2023-2026 © Leon Starr under MIT Open Source License