ExecutionSpecification
ExecutionSpecifications are thin rectangles drawn along the lifeline that show the start and finish of an action that is being executed.
Commands
ExecutionSpecification uses the commands shown below.
activate - starts drawing the occurrence of an ExecutionSpecification
deactivate - finishes drawing the occurrence of an ExecutionSpecification
destroy - destroys an instance of a given lifeline
autoactivate - eases and automates the use of ExecutionSpecification
return - used with autoactivate to send reply messages and finish an ExecutionSpecification
++ - shortcut for activate
-- - shortcut for deactivate
!! - shortcut for destroy
Activate & Deactivate
The activate and deactivate commands are used to start and finish an ExecutionSpecification. The commands follow the message line where you want to affect the ExecutionSpecification.
Example: Activate & Deactivate
Destroy
In PlantUML, the object deletion message is represented by the destroy keyword, which denotes the end of the lifeline of a participant in a sequence diagram. Using the destroy keyword indicates that an instance of the target participant is being destroyed. This is typically used to show that an object is no longer needed and is being removed from memory. The destroy command uses an "X" to signify that a lifeline will no longer be active. It will also automatically finish an ExecutionSpecification.
Example: Destroy
Autoactivate & Return
Example: Autoactivate & Return
Shortcuts
The below shortcuts are for starting, finishing, and destroying ExecutionSpecifications with less code. When using these shortcuts, you can start and finish ExecutionSpecifications on the same line. See line 15. Compare the destroy example above to the similar example below. At the time of this writing, there is no shortcut for destroying a source as is done in the destroy example on line 18. The !! command will only destroy a message target.
Example: ExecutionSpecification Shortcuts
Color
ExecutionSpecifications only have one property, color. You can define colors with a standard color name or hex code. This works with all of the commands that start an ExecutionSpecification. However, the syntax varies. When using the commands activate or autoactivate, place the color immediately after the activated lifeline name. When using ++, place the color after right after the ++.
Example: ExecutionSpecification Color
Nesting
You can nest ExecutionSpecifications by activating a lifeline while it still has an active ExecutionSpecification.
Example: ExecutionSpecification Nesting
Last updated
Was this helpful?