Domain Modelling Technique
Domain Modelling Technique
Object-Oriented
Use case Communications
program classes
Descriptions Diagrams
with methods
Info about
process flow System Sequence Sequence
Diagrams Diagrams
Arrows: transition
transition-name(parameters) /action-expression[guard condition]
Rounded rectangle: state
Filled circle: pseudo state (in this case a start state)
Concurrency and Concurrent States
An object can be in more than one state at once
◦ For example, a printer can both be:
◦ On
◦ Idle
Concurrency and Concurrent States
How to develop State Machine Diagrams
1. Identify classes that might have states of interest
◦ Pick those with multiple status conditions the system cares about
2. For each class:
◦ List all states you can
◦ Think about the properties of the physical object (if appl.), and activities done to
it
3. Start building fragments of the diagram
◦ Identify transitions that lead to state changes
4. Put fragments together in the right order
◦ Can be recursive process
How to develop State Machine Diagrams
5. Review paths
◦ Look for concurrent paths
◦ Look for independent paths
6. Look for missed transitions
◦ Go through them pair by pair
◦ Check both directions
7. Expand transitions to add:
◦ Message events
◦ Guard conditions
◦ Action-expressions
8. Review and test
Practice:
Let’s build a state diagram for Boil an Electric Kettle
2) List all the conditions you can
◦ List all status conditions
◦ Properties of physical object
◦ Activities done to object
3) build fragments
◦ Identify transitions that lead to state changes
4) Put fragments together
Practice:
Let’s build a state diagram for Boil an Electric Kettle
5) review paths
◦ Independent paths?
◦ Concurrent paths?
6) Missing transitions?
7) Expand transitions:
◦ Message events
◦ Guard conditions
◦ Action-expressions
8) Test
RMO example
Develop the SaleItem State Machine Diagram
◦ Status conditions:
◦ Ready to be shipped
◦ On back order
◦ Shipped
◦ Can an item be partially shipped?
2) List all the conditions you can
• List all status conditions
• Properties of physical
object
• Activities done to object
RMO Example
Identify exit transitions for each status condition
◦ Ready to be shipped: shipItem
◦ On back order: itemArrived
◦ Shipped: no exit transition
◦ Open: saleComplete