Activity Diagrams
Activity Diagram
How the system accomplishes its goals
Final activity node
Is used to stop all control flows and object flows in an activity.
Initial node
Portrays the beginning of a set of actions or activities.
Control flow
Shows the sequence of execution.
Activity Diagram
a simple and intuitive illustration of what happens in a workflow, what activities can be done in parallel, and whether there are alternative paths through the workflow.
joining
allows process to join multiple processes represented using synchronization bar with 2 or more incoming transitions and 1 outgoing transition waits until all incoming flows are completed before continuing
forking
allows process to split into multiple processes represented using thick horizontal or vertical line with 1 incoming transition and 2 or more outgoing transitions
Activity states
can be further decomposed.
Sequence: Frame
indicates the context of the sequence diagram
Activity: Swim lane
used to break up an activity diagram into rows and columns to assign the individual activities
Activity diagrams contain
Activity states, transitions, and objects
Flow
When an action or activity completes, data passes in to the next action.
rendevous
activity digram- multiple incoming & outgoing transitions
Action states
are atomic and cannot be decomposed
guard condition
boolean condition that determines path represented in square brackets
start/ end state
denoted by a black circle, and a round black circle with a circle around it
Sequence: execution occurrence
long narrow rectangle atop a lifeline -denotes when an object is sending or receiving messages
Fork
may have one incoming transitions and two or more outgoing transitions
Join
may have two or more incoming transitions and one outgoing transition
Control flows
model execution paths
Object flows
model the flow of objects
activity diagram
most often associated with several digrams
Activity: Action
nondecomposable piece of behavior labeled by its name -round rectangle
Sequence: Object
participates in a sequence by sending and/or receiving messages -placed across top of diagram -rectangle
Sequence: Actor
person or system that derives benefits from and is external to the system. placed top of diagram - either stick figure or rectangle with <<actor>> in it
Activity: Initial node
portrays the beginning of a set of actions or activities -solid filled in circle
Activity: Object Node
rep. an object that is connected to a set of object flows labeled by class name - rectangles
Object Nodes
represent the flow of information from one activity to another
Activity: Activity
represents a set of actions labeled by its name - rounded rectangle
object deletion
sequence digram- X shown at the end of an objects lifeline when it is to be deleted
actors
sequence digram- a role that some user or other system plays when interacting with the system actor that initiates the system to far left of system
instance of classes
sequence digram- denoted by a rectangle with object name inside underlined
vertical dimension
sequence digram- time
Activity: object flow
shows flow of an object from one activity (action) to another - dotted line and arrow
Activity: Control flow
shows sequence of execution - line with arrow
branching
specifies alternate paths taken based on boolean expression may have on incoming transition and 2 or more outgoing ones represented as multiple arrows from one activity rectangle with guard condition in brackets or as a decision diamond
Branching
specifies alternate paths taken based on some Boolean expression
swimlane
specifies locus of activities used to partition activity states on activity diagram into groups denoted by solid vertical line
start and stop notation
start marker = filled in circle stop marker = filled in circle with circle around it
substate
state diagram- a state nested inside a state ex: driving a manual car
action
state diagram- instantaneous, describes what the action is
activities in state diagram
takes place while system is in state (takes time), represented by do/ in the state box
Activity Diagrams depict
the sequence of activities.
Activity: Join node
used to bring back together a set of parallel or concurrent flows of activities
Activity: Merge node
used to bring back together different decision paths
sequence diagrams
used to model dynamic aspects of a software system for visualizing how the system runs
Activity
used to represent a set of actions
Activity: Fork node
used to split behavior into a set of parallel or concurrent flows of activities
Activity: final-activity mode
used to stop all control flows and object flows in an activity (action) - filled in circle with outer circling
Activity: Final Flow node
used to stop specific control flow or object flow - circle with an X in it
Notation of Activity Diagrams
• Activities - rectangle with rounded ends; meaningful name; describe some activity e.g. Insert Card • Transitions - arrows with open arrowheads • Start state - black circle • Guard conditions - in square brackets • Decision Points - a diamond • Final state - black circle in white circle.
State Transition Diagrams
• Describe a sequence of transitions from one state to another in a specific class. • The actions that result from a State Change. • Captures all possible responses of a single object to all of the use cases in which it is involved (i.e. whatever that object is used) • Useful for modelling objects which have significant dynamic behaviour.
Specification of the activity diagram
- Stappen in de procedure in de vorm van actions of activiteiten - Transactie van data tussen de actions (noem je flow) - Je kunt zien wat de decisions zijn en wat parallel loopt - Start en einde van een activiteit/action
Guards
A condition that must be true in order for the trigger to cause the transition. These could be: • Pseudo code - "user submits job") • Events - "ready(true)" • An operation call - "execute()" • A calculation - "X > 5.54" • A time - "10 min" • Complex Predicate Logic
Guard (condition)
A condition that must be true to pass the flow - Specify the condition of outgoing flows with a decision point - Guards are expressed as [description] - Guards CAN NOT overlap -Having guard flows without decision points is allowed - Having flows without guards is allowed - If the decision point has an outcoming flow, having a guard is MANDATORY.
Joins
All incoming actions must finish before proceeding - A join may have 2 or more incoming flows and has 1 going out - Sychronization point for parallel flows - The outgoing flows is ONLY triggered when ALL the parallel flows are at the join point.
Sequence: Object destruction
An X is placed at the end of an objects lifeline to show that it is going out of existance
Pins
De input of output van een actie >[ ]<. - De 'Recieve signal node' (in, x[]) kan ook een initial node zijn. - Deze nodes laten zien dat een object beschikbaar is bij een bepaalde tijd of activiteit.
Expansion region
Dit ziet er altijd uit als 4 kleine blokjes. De acties moeten gedaan worden op alle items die onder deze group vallen
Join node
Is used to bring back together a set of parallel or concurrent flows of activities
Merge node
Is used to bring back together different decision paths that were created using a decision node
Decision node
Is used to represent a test condition to ensure that the control or object flow only goes down one path
Fork node
Is used to split behavior into a set of parallel or concurrent flows of activities
Final flow node
Is used to stop a specific control or object flow
Forks and Joins
Parallel actions
state
Represented by rounded rectangle with Object name inside
Object flow
Shows the flow of an object from one activity to another activity. Could also include actions
Actions
Steps in the process, primary activity nodes. - Its execution presents a small computation task - Its execution results in a change of the systems state - it execution extracts information from the system - actions are atomic (ondeelbaar) and CANNOT be decomposed - The execution of the action state is not interrupted
Control Nodes
There are 7 types!
Branching
This specifies an alternative path taken because of the guard condition - Must have 1 incoming flow and CAN have more than 2 outgoing
UML
Unified Modeling Language general-purpose, developmental modeling language in software engineering standard way to visualize a system design
Call activity node
Upside down pitchfork - Een eigen diagrammetje waar in de informatie uitgebreider (kleinere stapjes) is - Een node die een activiteit laat zien en gebruikt door middel van zijn naam - Is reusable
Swimlane
Used to break up an activity diagram into rows and columns to assign the individual activities (or actions) to the individuals or objects that are responsible for executing the activity
Object node
Vierkantje - Heeft belangrijke data en laat zien met welke acties die interact. - Een object dat gespecificeerd word door een object node, kan worden gecreeerd, geconsumeerd of gemodificeerd door de actions in zijn omgeving. - Heeft vaak een note erbij
Swim Lanes
Wanneer de activities meerdere participants hebben laat dit zien welke participant verantwoordelijk is. -Elke swim lane heeft een unieke naam die een real world entity of software object represent
Fork
When a flow breaks up into multiple flows - Has one incoming and may have 2 or more going out - Each flow represents an independent flow of data - The actions of each of the outgoing flows are at the same time
Time events
Zandloper: Moet text hebben die verteld wat het doet, is een waiting period (wacht 5 minuten) OF een INITIAL NODE (dan is het een periodieke actie, elke 5 minuten)
Action
a simple, nondecomposable piece of behavior.
concurrency
activity digram- fork, rendevous, join
join
activity digram- multiple incoming transitions and one outgoing transition
fork
activity digram- one incoming transition & multiple outgoing transitions
swimlanes
activity digram- used to show partition of activities
Sequence: Lifeline
denotes the life of an object during a sequence -contains an X at the point at which the class no longer interacts - dotted line
activity diagram
describes how activities are coordinated records dependencies b/w acitvities represents workflow of process
state diagram
describes the behaviour of a system, some part of a system, or an individual object
Properties of swimlane
each has name unique within diagram may represent some real-world entity may be implemented by one or more classes each activity belongs to only ONE swimlane, but transitions may cross swimlanes
transition
represents a change of state in response to an event, label is event that causes the change of state
Sequence: Guard Condition
represents a test that must be met for the message to be sent
activity
represents high level action or process can be business process or abstract computing process represented by a rounded rectangle
messages
sequence digram- can be actor to actor or actor to object arrow pointing between with label
opt
sequence digram- combined fragment: subsequence of a special interaction shown in a box may or may not occur
loop
sequence digram- iteration over objects # of iterations indicated by min..max syntax
vertical line attached to actors and objects
sequence digram- lifeline turns into activation box
Activity: decision node
used to represent a test condition to ensure that the control flow or obj flow only goes down one path - diamond with 2 paths labeling each criteria
Object Node
used to represent an object that is connected to a set of object flows
transitions
when action or activity of state completes, flow of control passes to next action or activity state shown by arrow flow of control has start and end
State
• A state is a condition during the life of an object or an interaction, during which it satisfies: some condition; performs some action; or waits for some events. • States are determined by the value of an objects attributes. An assignments state could perhaps be deducted by examining start and end date and comparing it to current date.
Sub-State Fragments
• A state may be divided into regions containing sub-states that exist and excuse concurrently. • E.g. "Applying breaks" could be a state and within this state, the front and rear breaks will be operating simultaneously and independently.
Activity Diagrams
• Describe a sequence of transitions/actions from one activity to another to fulfil a certain task • The different actions may involve different object and may be conditional. • Complements a state diagram as it focuses on the flow of activity to achieve a certain task which may involve different objects. • To determine what an object does during states of a state diagram, and what a collection of objects do through a whole use case.
Synchronisation Bars
• Drawn as shot, heavy horizontal or vertical bar. • Denotes the forking and subsequent synchronisation of the flow of control to potentially parallel activities. • Fork is used when one arrow goes in and numerous leaves. Join is used when numerous arrows go in but only one leaves.
Notation of State Diagrams
• Initial state - round black circle • Other states - rectangles with rounded corners showing name of state e.g. happy • Final state - a "bulls eye" circle ( black circle surrounded by white circle). This shows end of the transition, it is not a state in its own right. • Transitions - arrows - optionally with constraints/guard conditions.
Why is an objects state important?
• It could espied to messages differently depending on its state • E.g. in an Aircraft Flight Control System, it would react different to an event like Engine Failure when the state is inflight, taxiing or static.
Swim Lane Notation
• Swim lanes can group actions by: class, business unit, person etc. • Can be either horizontal or vertical • E.g. swim lanes could be Customer, Sales, Stockroom
Purpose of Activity Diagrams
• To model a task (for example in business modelling) • To describe a function of a system represented by a use case) • To describe the logic of an operation • To describe any flow of events