2

 -------

Is my work right? the include many time can be a probleme where ? and how i fix it ?

bruno
  • 32,421
  • 7
  • 25
  • 37
DJAMEL
  • 45
  • 5

1 Answers1

2

UML allows a use case to be included by any number of other use cases (including 0).

But in your diagram none of your includes are valid.

UC1 - - - -<<include>> - - ->UC2 means each time UC1 is executed then UC2 is executed too, and this is not the case for you :

  • very probably to search a company can be done alone, without having to search for a product too
  • it is not needed to accept the localisation when searching for a product. May be for a delivery but not for a search
  • to accept the localisation cannot ask for the authentication each time, probably the authentication is a precondition of several use cases but it must be done one time
  • to see the localisation on the map cannot request the permission each time, the permission is a precondition and if needed it must be done one time

You have to look at the extension

bruno
  • 32,421
  • 7
  • 25
  • 37
  • I would also prefer extend over include in this case. I do not agree with Bruno's statement that 'UC1 includes UC2' means that UC2 is executed always when UC1 is executed. I would define this relationship as follows: "The included UseCase must be available for the behavior of the including UseCase to be completely described." (quoted from the UML spec). – www.admiraalit.nl Sep 09 '20 at 10:29
  • @www.admiraalit.nl In [formal/2017-12-05](http://www.omg.org/spec/UML/2.5.1) the definition of the include between UC is `An Include relationship specifies that a UseCase contains the behavior defined in another UseCase` . The sentence `The included UseCase must be available for the behavior of the including UseCase to be completely described` is a constraint, it is not the definition. Definitively `UC1 - - -<> - -> UC2` means *UC2* is executed when *UC1* is, you confuse include and extend. – bruno Sep 09 '20 at 10:58
  • I think both sentences are part of the definition. Anyway, they don't imply that UC2 is executed always for every possible scenario. Suppose UC2 is included at step 3 of the basic flow of UC1. Then, I think it is allowed to have an alternative flow of UC1 which executes only step 1 and then follows alternative steps, not including UC2. – www.admiraalit.nl Sep 10 '20 at 05:54
  • @www.admiraalit.nl again you confuse with extend being conditional thanks to extension point – bruno Sep 10 '20 at 06:55
  • No, I know what I'm talking about. I know that some text books agree with you, but it is not what the UML specification says. – www.admiraalit.nl Sep 10 '20 at 12:41