Professional Documents
Culture Documents
4
Drawing Activity Diagram
• Representing Guard conditions:
• A guard condition is assigned to a transition to restrict use of the transition
• The condition must test true before in order to follow the associated transition
to the next activity
Ex.: you can’t leave the table when you’ve finished your dinner unless you have
finished your vegetables
5
Drawing Activity Diagram
• Representing Decisions:
• The decision is a true/false test, only one option is possible
• Each option is identified using a guard condition
Decision: condition that selects only Merge: comes from alternative paths to arrive at an
one outgoing edge from one or more activity as a result of doing any of the decision
outgoing flows. paths. 9
Drawing Activity Diagram
• Representing Concurrency:
• To show that a single process starts multiple concurrent threads or processes
• Fork nodes denote the splitting of the flow of control into multiple threads,
• Join nodes denotes the synchronization of multiple threads and their merging
of the flow of control into a single thread.
Figure 10. An example of using fork for splitting an activity and join for synchronization / merging 10
Drawing Activity Diagram --- Examples on Fork and Join:
11
Drawing Activity Diagram --- Examples on Fork and Join:
12
Activity Diagram–
Example
13
Activity
Diagram–
Example.. Cont.
14