Activity Diagram
- An Activity diagram is designed to be a simplified look at what happens during an operation or a process.
- An Activity diagram highlights the activities/operation.
- It describes the sequencing of activities, with support for both conditional and parallel behavior.
- They are used to explore the logic of :
- A complex operation
- A complex business rule
- A single use case
- Several use cases
- A Business process
- Used in Analysis and Design phase to depict a business workflow.
Should be used for :
- Analyzing a use case
At this stage, one is not interested in allocating actions to objects instead, we need to understand what actions need to take place –
- Understanding Workflow
Activity diagrams are very useful for understanding the business process.
- Describing a complicated sequential algorithm
In this case, an activity diagram is really nothing more than a UML-compliant flowchart.
Should not be used for :
- Trying to see how objects collaborate.
- Trying to see how an object behaves over its lifetime.
Parts of an activity diagram
- Decision-Making Activities
- Concurrent Paths / Parallel Activities
- Dynamic Concurrency
- Swim lanes
Decision-Making Activities
- Also called branch
- Two or more mutually exclusive transitions, each having a guard expression
- Every branch has its subsequent merge, where the exclusive transitions combine
- Appear in the diagram as hollow diamonds
Concurrent Paths / Parallel Activities
- FORK: One transition entering and two or more transitions leaving it
- JOIN: Two or more transitions entering it and Only one leaving it
- In general, for every Fork, there is a Join
- Forks have only One Entry Transition
- Joins have One Exit Transition
Dynamic Concurrency
Shows iterations without having to construct a loop
Swim lanes
- Arranges activity diagrams into vertical zones separated by lines
- Each zone represents the responsibilities of a particular class or department
- Tells about which object is responsible for which activity
Example
Exercise
- Customer call to Request Service
- Upon completion of this operation, the customer pays, and the sales and stockroom staff take and fill the customer's order simultaneously.
- Parallel processes to indicate that when the customer has paid and the order has been filled, then the order is ready for delivery.
- After the delivery of the order, the customer can collect the order, and the process is complete.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.