merlynhs
merlynhs

Reputation: 145

Use Case - Multiple Actors/Use Cases

Got a use case diagram question regarding parent child use cases.

Scenario

The parent use case is Create New Product and this has say 4 mandatory child use cases e.g. Model Product, Price Product, Approve Product etc.

The parent use case is always initiated by one actor. The same actor has an association with 2 of the 4 child use cases, whilst another 2 actors have the association with the other 4. How do I depict this digramatically. Do I show the four child connected to the parent use case using the <<include>> relationship and show the actors linked directly to the child use cases?

Thanks

Upvotes: 1

Views: 2801

Answers (1)

Aleks
Aleks

Reputation: 5854

As your problem statement is quite unclear, I will make the following assumptions. Please confirm/correct them:

  • By "parent-child UC" you actually mean sequencial execution. A Product must first be created, then modelled, then proced, etc.
  • One actor (Product creator on my diagram) executes always the "Create new product" and 2 more, while other actors (Actor1, Actor2) use the 4 UC (other than Create).

If so, the point here is to establish the workflow (UC order of execution) and user permissions. Permissions are easily shown using associations between actors and UCs.

Workflow is not directly depicted on a UC diagram. You should not use relationships between UCs to indicate their sequence (although there is a way). I recommend two actions to achieve what you want to achieve:

  1. Use pre and postconditions for each UC to mark the legal sequences (see the diagram for an example and eventually an UML book to understand the concept pre and postcondition)
  2. Draw an additional activity diagram to show the overall workflow. You can even trace activities to UCs (graphically or descriptevly) to show which UC implements which activity

This would be the corresponding use case model: enter image description here

And here is an example of an activity:

enter image description here

Upvotes: 3

Related Questions