I am making a UML diagram. Im wondering if im using the extends feature correctly.

I have a marketer that can search contacts but only if they have created them in the first place....

Have i got the right idea. Or should there be an association between the marketer and the update/delete contact too? Should the update/delete even extend the create contact?

enter image description here

  • In your question, you say the use case is "search contacts", but in the drawing it's labelled "update/delete contact". Which one is right ? – barjak Oct 21 '11 at 9:01

Hmm...extends is normally used to describe a use case that adds further functionality to a base use case. Moreover it is also used to describe something that might be optional and/or occur only in certain circumstances.


enter image description here

In this case, "Order Food" is the base use case and "Order Wine" extends it with further functionality. Moreover "Order Wine" is somehow optional as not everyone will necessarily order it. I've written a blog post about that, explaining the difference between the "include" and "extend" attributes of uml here: http://blog.js-development.com/2009/03/uml-use-case-extend-and-include.html

In your situation however, you want to introduce a condition that a given usecase can only be executed when that condition is met. IMHO using extends in this situation is not 100% correct. Moreover, personally I wouldn't introduce such constraints at the level of uml use case diagrams. Maybee later when detailing the use case you can add pre-/and postconditions where you then specify that the update/delete action can only be done if an item exists.

If you insist in adding that information on the use case diagram directly because you think the viewers should have that information, you might add a simple note on that use case.

Hence, I would model it this way

enter image description here

  • Hi Juri I read your post and your reply both make complete sense, Thanks for the response. v helpful :-) – Pete2k Oct 21 '11 at 17:19
  • You're welcome. Personally when I come across such issues while designing UML I ask myself on what I want to communicate to the person viewing my design and whether it might be an important fact to visualize to them. In the end it shouldn't be cluttered up with too much details. There should still be space for discussions which btw is better anyway :) – Juri Oct 22 '11 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.