Like creation, deletion can be triggered by a signal or an action. Deleting with a signal is simply a matter of sending an event to the instance you want to delete. There’s nothing special about a deletion event.

Deletion with an action (synchronous)

To delete an instance synchronously, use the delete !* command.

!* ac

There’s a pattern in Scrall of reversing a command by putting an ! in front of it.

In the example above, all instances in the instance set variable ac are immediately deleted. It is best to use this approach with classes that do not have state models. If the class does have a state model, the modeler should ensure proper synchronization so that deletion occurs when no critical activities are being executed by the instances to be deleted.