UML Diagrams Zicomi Systems publishes some UML example diagrams online from the world famous UML dictionary. more...
Version 2.5 Released Zicomi Systems is delighted to announce that version 2.5 of Zicomi Mentor is released. With support for UML 2.0 and all thirteen UML diagrams more...
Zicomi Systems' Director speaks about the UML at Objects by Design - an informative interview more...
Partner Programme Zicom Systems is delighted to announce a new world wide partner programme, become a partner today. more...
OMG Member Zicom Systems is made a member of the OMG!
Fork (Vertical)
A fork is a pseudostate that acts to split a single incoming transition into two or more concurrent outgoing transitions. All of the outgoing transitions fire at the same time.
Explanation
Many systems require that a number of actions are carried out or performed at the same time. In our daily lives we often carry out a number of tasks at once, we can be talking on the phone and still continue to do other work at the same time. A fork provides a mechanism to divide a transition into a number of concurrent (parallel) transitions that can then be used to represent this concurrent behavior. The concurrent transitions can be connected to other activities, states, forks, joins or pseudostates but they must be reunited before the state machine can conclude. The fork should not be confused with the decision that also has a number of outgoing transitions; the important difference being a decision does not create concurrent transitions since only one outgoing transition is allowed to fire.
Important Points
All of the paths that leave a fork must be merged.
A fork splits a path into a number of concurrent paths; these paths must be re-united with the use of a join at an arbitrary but subsequent part of the diagram.
Forks are not commonly named.
A fork, like any UML element can be named, but they are commonly not named as it often adds little meaning. The meaning is expressed in the transitions that leave the fork and the subsequent parts of the diagram.
Forks must be well nested.
The use of forks is a powerful device used to express concurrent behavior. This power of expression comes with the responsibility of ensuring that all the flows that were created are joined back into one or more single flows. There are a number of ways that this can be done but often joins are used to re-unite the flows.
A choice is related to a fork in the sense that both elements have a single incoming transition and a number of outgoing transitions. There are however a number of important differences. Firstly, the decision takes a single incoming transition and allows one (and only one) of a number of possible outgoing transitions to fire, whereas the fork splits an incoming transition into a number of concurrent outgoing transition which all fire at the same time. Secondly, the outgoing transitions of a decision must always be guarded, whereas the transitions exiting a fork cannot be guarded, except in the case of an activity diagram.