Search code examples
umluse-caseplantuml

How Do I Repesent Who Is Doing The Action In My Use Case?


I am trying to create a UML diagram of my use case.

I want to represent the following:

  • The actions that are taken
  • Who did the action
  • What the state is after each action

I want it to show in a linear process and not looping back on itself so it is clear what the steps are and the order that they are taken in.

A contrived example of what I am trying to do is:

@startuml
left to right direction

title: Bank Account
Client --> (NEW) : Request an Account
(NEW) --> Bank
Bank --> (OPENED) : Create an account number
(OPENED) --> Client1
Client1 --> (DEPOSIT) : Deposit some cash

@enduml

Which looks like this:

Bank Account UML Diagram

However, as you can see, to achieve this I have Client and Client1 as two separately named actors otherwise the diagram will not be linear. It will look like this:

Bank Account Looping UML Diagram

Which looks like you could potentially deposit some cash without opening an account.

So the reason why I want it linear is to show that in order to deposit some cash you must have opened an account first.

How do I do this?

Can I rename the Client1 to be Client or should I be using a different type of diagram? Or something else?


Solution

  • I'm not familiar with Plant UML but what I can say is that the model that you are wanting to produce is not a Use Case model. Use Cases are an abstraction that encapsulate steps (i.e. they hide them) to focus instead on business value. Notwithstanding the use of arrow heads and the use of labels to imply conditionality in your second diagram, this is much closer to being a correct Use Case model than the first.

    What I think you are after is actually a process map, such as might be produced using BPMN, or possibly an Activity Diagram.