up previous next contents
Next: Addressing Requirements Up: A sample process Previous: Interaction modeling   Contents

Subsections

Collaboration and State Modeling

Introduction

  • Model additional aspects of your system.
  • Most useful in real-time system design.
  • Collaboration diagrams are similar to sequence diagrams.

Collaboration diagrams

  • Shows how critical objects collaborate within a use case.
  • Collaboration diagrams are similar to sequence diagrams.
    • Collaboration diagrams focus on key transactions.
    • Sequence diagrams follow the flow of entire use cases (emphasis on time ordering).
    • Collaboration diagrams add extra detail related to timing of messages.

State diagrams

  • Captures the lifecycle of one or more objects.
  • Expressed in terms of:
    • Different states objects can assume
    • Events that cause changes in state

Basic elements:

  • Initial state - hollow circle containing a black dot.
  • Each additional state - rectangle with rounded corners.
  • Three standard events:
    • Entry
    • Exit
    • Do
  • Transition - an arrow between two states.

How many state diagrams are needed?

  • Every object has a state machine.
    • Object is created.
    • Sends messages.
    • Receives messages.
    • It is destroyed.
  • In reality, most state machines are boring, so don't waste time drawing them.
    • Don't diagram an object with two states, On and Off.
  • Readability is important.

Activity diagrams

  • Remarkably similar to flowcharts.
  • Swimlanes - group a set of activities according to who is performing them.
  • A good way to understand/model business processes.


up previous next contents
Next: Addressing Requirements Up: A sample process Previous: Interaction modeling   Contents