1

When a login is needed in a system to perfom any action. How do you express that in a Use Case Diagram?

I have a system that will allow employees to perform sells. They must be logged in, but once they are, it is not necesary to log again until the session ends (typical login).

I do not know how can I express that that login is compulsory, but only once.

1
  • 2
    Somewhere I have read (but my google-fu is failing me) that in general login should not be on the (every/all) use case(s); because in general is is not what the user is actually trying to do. It is a side-effect or pre-condition, but putting it on the use case clouds the users intentions.
    – sdg
    Commented Dec 6, 2011 at 17:28

3 Answers 3

4

Use Cases form a proper class hierarchy.

Must-be-logged-in Use case can be a super-class of the rest of your use cases.

Some folks like to use <<extends>> to show that a use case extends the login use case.

See this diagram: http://yuml.me/diagram/scruffy/usecase/draw

3

If the login is part of the system you are creating it should be a use case in itself that is listed as a prerequisite for other use cases. if you are using an outside system (i.e. Windows authentication) you could simply list that the user has authenticated through windows authentication or whatever system you plan to use. Its generally good practice to always have a precondition and post condition sections of your use case.

0

From your requirement, you mention this

They must be logged in,

In order to perform sells (one use case), they MUST also login (one use case). I believe this login use case will be reuse everywhere other than sells module. Thus I would like to suggest to use <<include>>. Below is the text on the <<include>> usage extract from this link.

An e-commerce application that provides customers with the option of checking the status of their orders. This behavior is modeled with a base use case called CheckOrderStatus that has an inclusion use case called LogIn. The LogIn use case is a separate inclusion use case because it contains behaviors that several other use cases in the system use. An include relationship points from the CheckOrderStatus use case to the LogIn use case to indicate that the CheckOrderStatus use case always includes the behaviors in the LogIn use case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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