Activity Diagram

From Open Risk Manual
Revision as of 21:22, 16 February 2022 by Wiki admin (talk | contribs) (Created page with "== Definition == An '''Activity Diagram''' is a behavioral type UML diagram that is a graphical representation of workflows of distinct activities and actions. Activity diagra...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Definition

An Activity Diagram is a behavioral type UML diagram that is a graphical representation of workflows of distinct activities and actions. Activity diagrams are intended to model both computational and organizational processes, as well as the corresponding data flows. The focus is on modeling procedural aspects of a system, specifying the control flow and data flow between various steps and the actions required to implement an activity. The diagram supports elements such as choice branches, iteration loops and concurrency.

Activity diagrams primarily show the overall flow of control but they can also include elements showing the flow of data between activities through one or more data stores. An activity diagram allows the specification of user-defined behavior in the form of activities. An activity itself can describe the implementation of a Use Case Diagram. At a very detailed level an activity diagram can also define the behavior of an operation in the form of individual instructions. An activity can be assigned to an operation in a Class Diagram but it can also be autonomous.

Flow-oriented language concepts find their origins in languages for defining business processes. A business process defines how business entities interact to achieve their goals and also internal processes within a company.

PlantUML Elements

NB: The PlantUML syntax for representing an Activity Diagram has changed. The following follows the new syntax.

A PlantUML use activity diagram specifies and shows the following:

  • Start /Stop / End Points
  • Conditional Branch
  • Repetition Loop
  • Parallel Flow / Concurrency
  • Grouping / Partitions
  • Swimlanes


Example

@startuml
skinparam handwritten true

start
:ClickServlet.handleRequest();
:new page;
if (Page.onSecurityCheck) then (true)
  :Page.onInit();
  if (isForward?) then (no)
    :Process controls;
    if (continue processing?) then (no)
      stop
    endif

    if (isPost?) then (yes)
      :Page.onPost();
    else (no)
      :Page.onGet();
    endif
    :Page.onRender();
  endif
else (false)
endif

if (do redirect?) then (yes)
  :redirect process;
else
  if (do forward?) then (yes)
    :Forward request;
  else (no)
    :Render page template;
  endif
endif

stop

@enduml

Activity Diagram

References