Scaramouche
Scaramouche

Reputation: 3267

UML Sequence diagram auto-numbering in Visual Paradigm

I'm fairly new to Visual Paradigm and I noticed the auto-numberign feature on the messages of the sequence diagram, which I like a lot since it gives you a visual guidance specially when the diagram gets really large. Then I found myself in a situation like this one in this fragment enter image description here where I did not agree with the number it assigned message PIN Entered. Although I thought I could just manually change it to what made more sense to me, a 1.4, my question is: is there a way to make VP notice the relation of continuity between Request PIN and PIN Entered without just adjusting the values manually?

Upvotes: 5

Views: 16321

Answers (2)

Regarding on how to set different ways of numbering sequence messages in Visual Paradigm, you should read the section "Setting different ways of numbering sequence messages" from the How to Draw Sequence Diagram? guide from Visual Paradigm.

In summary, just right click on the diagram's background, select Sequence Number and then choose your option from the pop-up menu.

enter image description here

Regarding your specific example, as @sim has already answered, the diagram you have provided is wrong. If we read just the diagram, it says:

  1. The card is inserted by the ATM Customer to the ATM.
  2. The ATM verifies the card with the Bank.
  3. If the card is valid, the ATM asks the ATM Customer for the PIN.
  4. If the card is invalid, the ATM ejects the card.
  5. Anyway the ATM Custumer enters the PIN.

It only makes sense that the ATM Custmer enters the PIN only when the card is valid. Therefore that sequence message (that reply) should be a reply to the Request PIN message. Something like this:

enter image description here

And as @Sim has also already suggested, it's a good idea to use separate sequence diagrams for different scenarios.

Upvotes: 7

sim
sim

Reputation: 1168

Obviously you are using the sequence diagram as an analysis tool, not a design tool. In such a usage it can be ok to use the syntax in a less strict form. Thought, this makes it hard for a program to determine what you are modelling and what is your intended sequence.

In your modelled sequence, you return a PIN in the reply message 2.2, but this makes only sense as reply to message 1.3. As message 1.3 and 2.1 are different, it is not possible for a program to determine to which message the reply message belongs. I propose to clean up the diagram and e.g., abort after returning the card or even better, use seperated sequence diagrams for main success scenarios and aborting scenarios.

Upvotes: 2

Related Questions