Reputation: 43
I have a case that the application will destroy an object when condition is met. If the object is not destroyed, it will be used in later part in the sequence. I was wondering how to model that in sequence diagram.
Here is a simple demo, is that a valid sequence diagram?
Upvotes: 4
Views: 2098
Reputation: 36323
You can not legally model it this way in UML
17.12.6 DestructionOccurrenceSpecification ... 17.12.6.4 Constraints
no_occurrence_specifications_below
No other OccurrenceSpecifications on a given Lifeline in an InteractionOperand may appear below a DestructionOccurrenceSpecification.
Which basically means that you can have the destruction occur only once. However, you can model the above like this:
Upvotes: 3