Documentation · Process
Activity diagram
Declare a partition, then the nodes inside it, then wire them. Partitions are drawn as columns and the flow reads down the page.
When to use it
Model a UML activity, branching control flow or parallel work, with partitions for responsibilities.
Activity partitions are columns and the flow reads down the page. Fork/join and decision/merge nodes have different meanings; choose the right one.
Working example
Copy this complete example into the Source tab, then press Generate. Change its labels or values to make your first version.
activity "Client Visit" {
lane SALES "Sales Person" {
initial S1
action A1 "Call client and set up appointment"
decision D1
action A4 "Send follow-up letter"
decision D2
final E1
}
lane CONS "Consultant" {
action A2 "Prepare a laptop"
action A3 "Meet with the client"
action A5 "Create proposal"
action A6 "Send proposal to client"
}
lane TECH "Corporate Technician" {
action A7 "Prepare a conference room"
}
S1 -> A1 -> D1
D1 [appointment offsite] -> A2
D1 [appointment onsite] -> A7
A2 -> A3
A7 -> A3
A3 -> A4 -> D2
D2 [statement of problem] -> A5 -> A6 -> E1
D2 [no statement of problem] -> E1
}Syntax reference
The same reference used by the editor and AI briefing. Syntax is notation-specific; use the keywords listed here.
Diagram
| Syntax | Meaning |
|---|---|
activity "Title" { | open an activity diagram |
lane L "Name" { | a partition; it is drawn as a column |
Nodes
| Syntax | Meaning |
|---|---|
initial S1 | the filled dot it starts at; alias: start |
action A1 "Do it" | a rounded box; alias: task |
decision D1 | a branch; guards go on the arrows |
merge M1 | the branches coming back together |
fork F1 | one flow splitting into several |
join J1 | several coming back into one |
object O1 "Invoice" | a value passing along the flow |
final E1 | the bullseye it ends at; alias: end |
flow-final X1 | this one branch stops here |
Flows
| Syntax | Meaning |
|---|---|
A -> B | control flow |
D1 [yes] -> B | a guard on the branch |
A -.-> O1 | object flow (dashed) |
A -> B -> C | chain |
Language rules
- The file is one activity "Title" { ... } block.
- Partitions are lane L "Name" { ... } and are drawn as columns, left to right in the order written.
- Declare every node inside the partition it belongs to, then wire them after or inside.
- A guard belongs on the arrow out of a decision: D1 [yes] -> A2.
- A decision has one flow in and several out; a merge has several in and one out.
Edit on the canvas
- Rename actions and move them between partitions. Add or remove partitions with their own controls.
- Choose control-flow or object-flow connectors to match the relationship you mean.
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 activity diagram. Answer with Tingraph source only.
SYNTAX
Diagram
activity "Title" { open an activity diagram
lane L "Name" { a partition; it is drawn as a column
Nodes
initial S1 the filled dot it starts at; alias: start
action A1 "Do it" a rounded box; alias: task
decision D1 a branch; guards go on the arrows
merge M1 the branches coming back together
fork F1 one flow splitting into several
join J1 several coming back into one
object O1 "Invoice" a value passing along the flow
final E1 the bullseye it ends at; alias: end
flow-final X1 this one branch stops here
Flows
A -> B control flow
D1 [yes] -> B a guard on the branch
A -.-> O1 object flow (dashed)
A -> B -> C chain
RULES
- The file is one `activity "Title" { ... }` block.
- Partitions are `lane L "Name" { ... }` and are drawn as columns, left to right in the order written.
- Declare every node inside the partition it belongs to, then wire them after or inside.
- A guard belongs on the arrow out of a decision: `D1 [yes] -> A2`.
- A decision has one flow in and several out; a merge has several in and one out.
WORKED EXAMPLE
activity "Client Visit" {
lane SALES "Sales Person" {
initial S1
action A1 "Call client and set up appointment"
decision D1
action A4 "Send follow-up letter"
decision D2
final E1
}
lane CONS "Consultant" {
action A2 "Prepare a laptop"
action A3 "Meet with the client"
action A5 "Create proposal"
action A6 "Send proposal to client"
}
lane TECH "Corporate Technician" {
action A7 "Prepare a conference room"
}
S1 -> A1 -> D1
D1 [appointment offsite] -> A2
D1 [appointment onsite] -> A7
A2 -> A3
A7 -> A3
A3 -> A4 -> D2
D2 [statement of problem] -> A5 -> A6 -> E1
D2 [no statement of problem] -> E1
}
OUTPUT
- Reply with one fenced code block and nothing else.
- The block starts with `activity "…" {` 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.