Make activity diagram
make_activity_diagramUse this when the user wants a UML activity diagram or a process flowchart drawn from steps, for example "draw the checkout flow as an activity diagram" or "make a PDF of this process". Takes the diagram text in a line grammar: start / stop / end; :Action text; ; if (condition) then (label) ... elseif (condition) then (label) ... else (label) ... endif; while (condition) is (label) ... endwhile (label); fork ... fork again ... end fork; note: text (right after the step it belongs to); # comments. Labels are optional; a condition or label must not contain ( or ). When the user describes the process in words, write it in this grammar first. Returns counts, the steps in flow order with their block path, the links between them, the flow check (steps that are not reachable, empty branches), a check on the drawing, the PDF page count, an interactive diagram, and PDF, SVG and CSV downloads. Refuses a line outside the grammar with its line number and token. Up to 200 actions, 60 decisions, 6 fork branches, 6 nesting levels and 400 characters per line. Does not read repeat loops, switch, swimlanes or partitions. Download links of large diagrams expire after about 1 hour.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Title printed on the diagram and used in file names, up to 80 characters, e.g. "Order checkout". | |
| diagram | Yes | The activity in this line grammar, one statement per line, up to 40,000 characters, 2,000 lines and 400 characters per line (comments included): start | stop | end | :Action text; | if (condition) then (label) ... elseif (condition) then (label) ... else (label) ... endif | while (condition) is (label) ... endwhile (label) | fork ... fork again ... end fork | note: text | # comment. Labels are optional; conditions and labels must not contain ( or ). Example: "start\n:Receive order;\nif (in stock?) then (yes)\n:Ship it;\nelse (no)\n:Refund;\nendif\nstop". | |
| page_size | No | PDF paper: letter (default) or a4. A wide diagram turns the page to landscape. Example: a4. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| edges | Yes | ||
| nodes | Yes | ||
| shown | No | ||
| title | Yes | ||
| counts | Yes | ||
| analysis | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| layout_check | Yes |