Documentation · Process
Use case
Declare the actors, then the use cases inside a system block, then join them. Actors that start something stand on the left, actors that only answer stand on the right.
When to use it
Describe what actors want to do with a system, without modeling the internal implementation.
A system boundary is an outline, not a parent that moves all its contents. Removing it leaves the use cases on the sheet.
Working example
Copy this complete example into the Source tab, then press Generate. Change its labels or values to make your first version.
usecase "Bank ATM" {
actor CUST "Customer"
actor TECH "ATM Technician"
actor BANK "Bank" right
system ATM "Bank ATM" {
usecase U1 "Check Balances"
usecase U2 "Deposit Funds"
usecase U3 "Withdraw Cash"
usecase U4 "Transfer Funds"
usecase U5 "Maintenance"
usecase U6 "Repair"
}
CUST -> U1
CUST -> U2
CUST -> U3
CUST -> U4
TECH -> U5
TECH -> U6
U1 -> BANK
U2 -> BANK
U3 -> BANK
U4 -> BANK
U5 -> BANK
U6 -> BANK
include U3 -> U1
}Syntax reference
The same reference used by the editor and AI briefing. Syntax is notation-specific; use the keywords listed here.
Diagram
| Syntax | Meaning |
|---|---|
usecase "Title" { | open a use case diagram |
system S "Name" { | the boundary the use cases stand in |
Elements
| Syntax | Meaning |
|---|---|
actor A "Name" | a stick figure outside the system |
actor A "Name" right | pin it to that side of the boundary |
usecase U "Goal" | an oval, declared inside a system block |
Relations
| Syntax | Meaning |
|---|---|
A -> U | association: A takes part in U |
include U -> V | U always runs V |
extend V -> U | V adds to U, under a condition |
inherit A -> B | A is a kind of B (hollow head) |
# comment | line comment (also //) |
Language rules
- The file is one usecase "Title" { ... } block.
- Actors are declared at the top level; use cases go inside system S "Name" { ... }.
- A -> U is an association and is the only relation written with a bare arrow.
- include, extend and inherit each take one relation: include U -> V.
- An actor with no side written takes the left if it starts anything, the right otherwise.
Edit on the canvas
- Move actors and use cases independently; use the boundary controls to name, add or remove a system boundary.
- Choose association, include, extend or generalization connectors from the rail.
Generate replaces the drawing from source. Save before generating again if you want to preserve manual finishing touches.
Read Saving & exportingWrite it with an assistant
Tingraph AI already knows this notation. For another assistant, copy the tutorial below, describe your diagram under MY DIAGRAM, then paste the returned source into the editor. This prompt includes every syntax row, rule and working example above.
Read the complete prompt
You are writing Tingraph source. Tingraph is a small text language that draws a UML use case diagram. Answer with Tingraph source only.
SYNTAX
Diagram
usecase "Title" { open a use case diagram
system S "Name" { the boundary the use cases stand in
Elements
actor A "Name" a stick figure outside the system
actor A "Name" right pin it to that side of the boundary
usecase U "Goal" an oval, declared inside a system block
Relations
A -> U association: A takes part in U
include U -> V U always runs V
extend V -> U V adds to U, under a condition
inherit A -> B A is a kind of B (hollow head)
# comment line comment (also //)
RULES
- The file is one `usecase "Title" { ... }` block.
- Actors are declared at the top level; use cases go inside `system S "Name" { ... }`.
- `A -> U` is an association and is the only relation written with a bare arrow.
- `include`, `extend` and `inherit` each take one relation: `include U -> V`.
- An actor with no side written takes the left if it starts anything, the right otherwise.
WORKED EXAMPLE
usecase "Bank ATM" {
actor CUST "Customer"
actor TECH "ATM Technician"
actor BANK "Bank" right
system ATM "Bank ATM" {
usecase U1 "Check Balances"
usecase U2 "Deposit Funds"
usecase U3 "Withdraw Cash"
usecase U4 "Transfer Funds"
usecase U5 "Maintenance"
usecase U6 "Repair"
}
CUST -> U1
CUST -> U2
CUST -> U3
CUST -> U4
TECH -> U5
TECH -> U6
U1 -> BANK
U2 -> BANK
U3 -> BANK
U4 -> BANK
U5 -> BANK
U6 -> BANK
include U3 -> U1
}
OUTPUT
- Reply with one fenced code block and nothing else.
- The block starts with `usecase "…" {` and ends with `}`.
- Do not invent keywords: use only the ones listed above.
- Keep labels short enough to read inside a box, and keep every ID unique.
MY DIAGRAM
Describe what you want here, then send this message.Something unclear? Contact support or read the Privacy Policy.