One Tamad
One Tamad

Reputation: 67

Is this a correct UML-Activity Diagram?

Here is an activity diagram screenshot:

enter image description here

Is it correct? If no, what am I doing wrong?

Upvotes: 5

Views: 19771

Answers (1)

Christophe
Christophe

Reputation: 73366

Syntactically, this activity diagram with partitions seems almost correct:

  • The start node should be a solid (black) circle;
  • The final node should have an inner solid (black) circle;
  • Adding a second final node after Request valid user name ... would better show that it stops there.
  • The decision input valid user name should in principle not float in the air (an activity diagram is not a flowchart): It should be in an annotation box with a stereotype «decisionInput»
  • The guards of the outgoing edges of the decision node should be between brackets ([yes], [no], or better: [valid user name], [invalid user name], which would allow to omit the annotation)

Semantically, there is some ambiguity:

  • The partitions are named according the the actors of a use case. But while the activity diagram should tell what happens IN the system, the actors are OUT of the system. The partition System reinforces the ambiguity, since it suggest that the other actions are not performed by the system:

    • When reading Request valid user name ... I therefore wonder if the system will request this, or if the student using the system has to do this.
    • Same for Show uploaded documents and View student documents : are both actions performed by the system, or is it a mix of what the system does and what external actors do?
  • Moreover, even if we think that the actor partitions are for actions of the system done in relation with an actor, there would be soma ambiguity of what is in what column.

  • What does the action Invalid username or password entail? Is this really a behavior of the system or is this just an observation of the situation when arriving at this point? In the latter case, see above my remark about guards: an explicit guard [invalid user name] would simplify the diagram and avoid an unnecessary pseudo-action.

How to make it better?

  • First, clarify the scope of your diagram: is the system being modelled an IT system? If yes, clarify the meaning of each partition.
  • Then rethink the wording of your actions, and make sure they are expressed as something that the system does.

Upvotes: 7

Related Questions