Top Banner
Using Activity Diagrams to Model Use Cases Visually Part 3: Ignoring the Variable Details by Declan Chellar
25

Activity Diagram tutorial part 3

Sep 03, 2014

Download

Declan Chellar

Activity diagram tutorial part 3 shows why you should ignore variable details such as data and business rules when modelling.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Activity Diagram tutorial part 3

Using Activity Diagrams toModel Use Cases Visually

Part 3: Ignoring the Variable Detailsby Declan Chellar

Page 2: Activity Diagram tutorial part 3

Our activity diagrams model the Actor/System

interactions within a Software Use Case.

Page 3: Activity Diagram tutorial part 3

In this example, “Add Address”, we model only the logical interactions between

the Actor and the System

Page 4: Activity Diagram tutorial part 3

There may be variations in the kind of data that makes up an address, for example,

addresses in different countries…

Page 5: Activity Diagram tutorial part 3

…but those details are documented as part of the data requirements for the

relevant step.

Page 6: Activity Diagram tutorial part 3

And they should not distract from the logic of the

process itself by appearing in the activity diagram.

Page 7: Activity Diagram tutorial part 3

The same is true for any business rules which might affect the flow.

Page 8: Activity Diagram tutorial part 3

Or any messages that the System might need to display to the Actor.

Page 9: Activity Diagram tutorial part 3

This activity diagram tells us the essential nature of the

process without clogging it up with data options, business rules, button clicks and on-

screen messages.

Page 10: Activity Diagram tutorial part 3

Any of those things can change in the future without the proces s

itself changing.

Page 11: Activity Diagram tutorial part 3

But analysts who lack experience in drawing activity diagrams often treat

every possible data and screen option as if it were an alternate path

through the use case.

Page 12: Activity Diagram tutorial part 3

Imagine we could capture two types of address in our use

case: An Irish address, which does not use post codes, and

a UK address, which does.

Page 13: Activity Diagram tutorial part 3

Modelling those data differences as alternate paths results in a much more complicated activity diagram, which is

harder to follow without really providing any extra information.

Page 14: Activity Diagram tutorial part 3

Very inexperienced analysts sometimes even try to model the capture of every item of data as a

separate step in the process!

Page 15: Activity Diagram tutorial part 3

If we modelled our activity diagram like this, look what

would happen if we had to add a third address type…

Page 16: Activity Diagram tutorial part 3
Page 17: Activity Diagram tutorial part 3

By the way, if your activity diagram contains alternate flows hanging off alternate

flows, it’s a sign that something may be wrong.

Page 18: Activity Diagram tutorial part 3

Another mistake is to try to model each data/business rule/screen variance as a

different use case.

Page 19: Activity Diagram tutorial part 3

This adds effort to the modelling task without adding

clarity. Indeed, it reduces clarity and increases maintenance and

development effort.

Page 20: Activity Diagram tutorial part 3

When you model it this way, it doesn’t matter how many different address types get added to the data model, or whether

the definition of “Valid” changes or whether the on-screen messages change.

Page 21: Activity Diagram tutorial part 3

One thing needs to remain absolutely clear…

Page 22: Activity Diagram tutorial part 3

This is not an alternative way of

modelling a use case…

It is plain wrong!

Page 23: Activity Diagram tutorial part 3

This is not an alternative way of

modelling a use case…

It is plain wrong!

Page 24: Activity Diagram tutorial part 3
Page 25: Activity Diagram tutorial part 3