Make explicit in UML state diagram that order of activities does not matter

246 views Asked by At

Have a UML state diagram describing behaviour of a system by showing the interaction of the user and the system to carry out a use case. This diagram is used as agreement (requirement) with the developers of the system.

When the user request to carry out a use case, the system request information to the user and show error messages if the information is not valid. The system also authenticate the user and show him an error if he is not authenticated.

But it does not matter which activity is done first. It is, which error, information or authentication error, is shown first. We want to make explicit to the developers that the order of activities does not matter though all activities should be done. How we achieve that? I think the "fork" item in state diagram is for this?

1

There are 1 answers

8
Ister On

It seems that you are confusing state machine diagram with activity diagram (and possibly also sequence diagram). The latter has fork (and in sequence diagram there is a way of showing that events are happening in parallel).

The state machine diagram does show the changes of the state and its triggers but is not the main diagram to show related actions nor their flow. Moreover the entire state machine of an entity typically is influenced by more than one user story. In other words, triggers of state changes can be caused by different use cases. So state machine is across multiple user stories rather than describing just one.

If you try to document flow of use case using state machine diagram, you are most probably doing it wrong.