Search code examples
umldiagramuse-caseactivity-diagramuse-case-diagram

How to represent common tasks between two users in activity diagram if each user has his own set of tasks?


Consider I have two users to use my website system (User and Admin), on each of their pages (User page and Admin page) they have some actions (tasks) available to run out in concurrent manner (A1 and A2 available for User) and (A1,A2,A3 and A4 available for Admin). As it seems, both have some common actions (tasks) are available on each of their own web pages. How can such case be represented in an activity diagram? I wonder whether the reappearance of A1 and A2 in the following diagram is valid..enter image description here


Solution

  • No, this is not valid. Actions in a Activity are supposed to be unique and not to reappear at different locations. Only if these actions are activity invocations (having a fork icon bottom right) and as such different instances you can have them at multiple places.

    Else you can model this diffently by just blocking A3 and A4 from being used by a user.

    enter image description here

    You can have A3/A4 with another fork in parallel. I left that out for brevity.


    Previous answer

    Use cases only show added value an actor gets from the system under consideration. No functionality! So that's where you stop.

    If you model a UC with activities you then create a scenario where you eventually split according to the actor.

    Your AD above is bad since it uses the same name for UC and Action. This is misleading! Step back and model just one UC. Re-using actions is usually not a good idea since it indicates a wrong cut. But that very much depends.