Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
1-30_Teoria.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
2.59 Mб
Скачать

22. Main elements of activity diagram: definitions, des, examples.

Activity diagrams are a technique to describe procedural logic, business process, and work flow. In many ways, they play a role similar to flowcharts, but the principal difference between them and flowchart notation is that they support parallel behavior.

  • Initial node or start marker, activity final or stop marker (pseudostates). An action is something an object does, such as it sending a message

  • Action caused by an event can be recorded on transition after a forward slash

  • Guards- It may be the case that an event only causes a transition if certain conditions are satisfied

  • Conditions can be specified in a guard (e.g., [last copy], [not last copy], [x <= 3], etc.)

  • Guard expression can be any expression that has a boolean value (i.e., true or false)

  • In a guard, can use normal language, object constraint language (OCL), programming language – anything that allows for an unambiguous condition to be specified

  • Join merges two or more threads into one

  • Fork splits one thread into two or more concurrent threads

Trigger-event

  • Partitions (“swim lanes”)- Can use partitions or “swim lanes” to record the actions within the activity that are carried out by each

    • Class

    • Company department

    • Actor

    • User

  • Can also partition actions according to which use cases they belong to

  • Flows and edges- Flow or edge is arrow connecting actions in activity diagram

  • Simplest flow simply carries token

  • Can name flow if desired (but usually not necessary)

  • If awkward to connect two actions, can use connectors

    • Avoid connectors if possible!

  • Can pass objects along flows

23. Decomposing an action on activity diagram: definition, description, example.

Activity diagrams are a technique to describe procedural logic, business process, and work flow. In many ways, they play a role similar to flowcharts, but the principal difference between them and flowchart notation is that they support parallel behavior.

Figure 1 shows a simple example of an activity diagram. We begin at the initial node action and then do the action Receive Order. Once that is done, we encounter a fork. A fork has one incoming flow and several outgoing concurrent flows.

24. Partitions, expansion regions, flow final, join specifications: definitions, description, examples

  • Partitions (“swim lanes”)- Can use partitions or “swim lanes” to record the actions within the activity that are carried out by each

    • Class

    • Company department

    • Actor

    • User

  • Can also partition actions according to which use cases they belong to

Expansion regions

  • Flow finals- When have multiple tokens, flow can stop without activity stopping

  • Flow final indicates termination of flow, not activity

  • Time signal “Deadline for submission” triggers allocation of submitted papers to reviewers

  • Each paper is reviewed by a reviewer and either accepted or rejected

  • Reviewing done in parallel – indicated by keyword, <<concurrent>>

  • If paper rejected, ends flow; otherwise, token added to output collection

  • Output collection passed to “Publish accepted papers”

  • Expansion region acts as a filter

  • Use expansion regions when output of action triggers same sequence of actions to be performed on two or more objects

  • Join specifications- Join emits token on output flow when token arrived on each input flow

  • Sometimes want join to emit token when special conditions apply

  • Can do this with a join specification

    • Boolean expression must be true in order for token to be emitted on output flow

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]