# [WIP] Suggest Changes!
# TODO: test out whether a stack-machine is the best way to denote these.
# Generic Participant
os:"Operating System"
# Actor
@customer:"User"
# Class
Window:"Window"
customer -> Window : "Close"
Window -|> Window : "Save"
Window -|> os : "Store to Disk"
return
return
# alternative
# Generic Participant
os:"Operating System"
# Actor
@customer:"User"
# Class
Window:"Window"
# the stack
- main()
- A: async processRequest()
[is valid]
- B: validateInput() -> boolean
- B: checkLength() x
else
- C: handleError()
- [optional] A: cleanup()
- while [x is bigger than y]
[useCache]
- B: pathA() -> string
else
- C: pathB() -> number
- A: async sendResult()
# yml like
participants:
os: "Operating System"
customer:
name: "Customer"
type: actor
window:
name: "Window"
type: class
begin:
- to: os
name: "processRequest()"
async: true
calls:
- if: "is valid"
calls:
- to: customer
name: "validateInput()"
returns: boolean
calls:
- to: customer
name: "checkLength()"
kill: true
else:
- to: window
name: "handleError()"
- to: os
name: "cleanup()"
optional: true
- while: "x is bigger than y"
calls:
- if: "useCache"
calls:
- to: customer
name: "pathA()"
returns: string
else:
- to: window
name: "pathB()"
returns: number
- to: os
name: "sendResult()"
async: true
# [WIP] Suggest Changes!
# TODO: test out whether a stack-machine is the best way to denote these.
# Generic Participant
os:"Operating System"
# Actor
@customer:"User"
# Class
Window:"Window"
customer -> Window : "Close"
Window -|> Window : "Save"
Window -|> os : "Store to Disk"
return
return
# alternative
# Generic Participant
os:"Operating System"
# Actor
@customer:"User"
# Class
Window:"Window"
# the stack
- main()
- A: async processRequest()
[is valid]
- B: validateInput() -> boolean
- B: checkLength() x
else
- C: handleError()
- [optional] A: cleanup()
- while [x is bigger than y]
[useCache]
- B: pathA() -> string
else
- C: pathB() -> number
- A: async sendResult()
# yml like
participants:
os: "Operating System"
customer:
name: "Customer"
type: actor
window:
name: "Window"
type: class
begin:
- to: os
name: "processRequest()"
async: true
calls:
- if: "is valid"
calls:
- to: customer
name: "validateInput()"
returns: boolean
calls:
- to: customer
name: "checkLength()"
kill: true
else:
- to: window
name: "handleError()"
- to: os
name: "cleanup()"
optional: true
- while: "x is bigger than y"
calls:
- if: "useCache"
calls:
- to: customer
name: "pathA()"
returns: string
else:
- to: window
name: "pathB()"
returns: number
- to: os
name: "sendResult()"
async: true