1

I have a problem statement that describes an online E-commerce system:

An E-commerce software system is going to be developed. This system allows customers to browse the store catalog, pick the items, and put them in an e-cart. Customer can place an order and enter his shipping details, credit card information. It provides a secure form of credit card payment service. It shall provide to customers a set of shipment methods, which are ground via local shipment agencies, next business day via DHL. The system has an administration backend that allows administrators to add new products, manage inventory and process customer’s refunds if they existed as well. The system should conform to all applicable local and international laws. It should also conform to the company standard STD0945. The requirements at the client side are no more than a web-browser and a reasonable amount of memory on a computing device. This system should have a fast response time and should tolerate common types of faults.

The question is to get the functional and non functional requirements: in the functional of the Customer I have "request a refund" and the functional for the Admin is 'process refunds', I considered the Admin as the secondary actor since he/she responds to initiated use case from the Customer (primary).

I have two question:

1- Can I consider the Admin as a primary actor since he/she has some use cases that he/she can initiate ?

2- Which of the following use case diagrams that describes the system are correct ? (I made 3 of them but I'm uncertain)

A) enter image description here

B) enter image description here

C) enter image description here

I'm conviced that C is the correct one, but I want to hear your thoughts on A and B.

3

Primary vs. secondary actors are not defined at system level but at use-case level. This means that the same actor Admin can be:

  • a secondary actor for a use case "Request a refund", since this request is not the Admin's objective, but he/she is nevertheless involved in this customer objective;
  • a primary actor for a use case "Add new products", since this activity is part of Admin's own goals in his/her professional capacity.

The usage of placing secondary actors to the right of the system is only an informal practice. From a formal point of view B and C are equivalent. Up to you to chose the most readable layout when an actor is both primary and secondary in the same diagram. Intuitively I'd opt for B, but it's a matter of taste.

A is anyway wrong, because there's no association allowed between two use cases (i.e. Request vs. process the refund).

Not related but to improve:

  • A use-case diagram is not meant to make a functional decomposition of the requirements, and not either to model the user interface. Overall, this diagram seems very detailed, so my advice would be to critically question what is really a use case with value for the user (independently of the others).
  • Shipment method is a noun and does not describe a use case. It's either Select shipment method (but then you can have no specialization via DHL or local; at best you could consider extension), or Process shipping instructions (assuming that the choice is already made before, but then it should be Process shipping instructions via DHL and Process shipping instruction via local to clarify that it's really a specialization and not a graphical mistake).
  • Pay with credit card could be considered as a sub-goal (even if it's difficult to imagine independently of the enclosing use case). But Place an order to extend it seems confusing. This seems plain functional decomposition. I'd really remove this last one from the diagram.
4
  • Thank you @Christophie ! A couple of follow-ups (I'm still learning about the manner so excuse me naive questions): 1) regarding A, If i left the two use cases (Admin:Process refunds, Customer:Request refund) but removed the association line between them, would this be considered correct ? 2) if I removed place order and made the "pay with credit" extends on "process shipping instructions" (which makes 'pay with credit' the final sequence), would this be considered correct ? 3) can you recommend any online sources/books on the difference between use cases and functional decomposition? – Ahmed Alhallag Oct 31 '20 at 9:01
  • 1
    @AhmedAlhallag 1) yes this would be correct (it doesn't show that both use-cases are related, but this is not a problem since it's a use-case diagram and not a process analysis diagram). 2) «extends» means it's optional and if you start to think about sequence, you're no longer in a use-case analysis. – Christophe Oct 31 '20 at 9:32
  • 2
    @AhmedAlhallag 3) I don't like to give online references. But Jacobson provides a good overview on modern use case analysis, and here you can find some useful advices. To go farther you really need to get a good book, for example Bittner & Spence (table of content) which is still a very good investment. – Christophe Oct 31 '20 at 9:35
  • I wish I was a student of yours. Thank you so much sir! – Ahmed Alhallag Oct 31 '20 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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