Download presentation
Presentation is loading. Please wait.
Published byMaximillian Dickerson Modified over 9 years ago
1
UML: The Unified Modeling Language Excertos do livro: The Unified Modelling Language User Guide by Grady Booch, James Rumbaugh and Ivar Jacobson
2
Activity diagrams – Activity diagrams are one of the models in the UML for modeling dynamic aspects of systems. – An activity diagram is essentially a flowchart, showing the flow of control from activity to activity.
3
Activity diagrams ● Terms and concepts: – Action/activity states ● Action states are atomic; activity states can be decomposed. – Transitions – Branching – Forking and joining
4
Activity diagrams ● Transitions: – When an activity completes, flow of control passes immediately to the next action or activity state. – You specify this flow by using transitions to show the path from one activity state to the next activity state. A transition is represented by a simple directed line. – A flow of control has to start and end. The initial state is represented as a solid ball and the stop state as a solid ball inside a circle.
5
Activity diagrams ● Branching: – A branch specifies alternate paths taken based on some Boolean expression and is represented as a diamond. – A branch has one incoming transition and two or more outgoing ones. – On each outgoing transition, you place a Boolean expression (a guard), specifying on which condition that path is taken. – Across all the outgoing transitions, guards should not overlap.
6
Activity diagrams ● Forking and joining: – You might encounter flows that are concurrent. You use a synchronization bar to specify the forking and joining of the parallel flows of control. – A synchronization bar is rendered as a thick horizontal line.
7
Activity diagrams – A fork represents the splitting of a single flow of control into two or more concurrent flows of control. – A fork has one incoming transition and two or more outgoing transitions, each of which represents an independent flow of control. – Below the fork, the activities associated with each of these paths continues in parallel.
8
Activity diagrams – A join represents the synchronization of two or more concurrent flows of control. – A join has two or more incoming transitions and one outgoing transition. – Above the join, the activities associated with each of these paths continues in parallel. – At the join, the concurrent flows synchronize,meaning that each waits until all incoming flows have reached the join, at which point one flow of control continues on below the join.
9
Activity diagram: example 1 Apresentar pedido requisição Apresentar identificação Registar identidade Registar livro Assinar requisição Entregar livro
10
Activity diagram: example 2 Apresenta pedido requisição Apresentar identificação Registar identidade Registar livro Assinar requisição Entregar livro Pagar dívidas [tem dívidas] [não tem dívidas]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.