Graphs and Members
A document holds one or more graphs, listed in the document outline: the document's own graph, Document, and the others under it. Each graph has a kind, which decides how it is drawn, which nodes it offers and what running it means. The kind is named above the canvas with the family it is filed under - Flows (Dataflow), Routine (Procedural) - where dataflow means values flow along wires and a node runs when its result is needed, procedural means steps run one after another, declarative means the graph describes something rather than computing it step by step, definition describes a type, and special marks the kinds that are still experimental.
The kinds
| Kind | Family | What it is |
|---|---|---|
| Flows | dataflow | A free-form canvas. Values travel along wires, and a run executes the nodes marked active and everything they depend on. It is the everyday surface for exploring and assembling. |
| Function | dataflow | A graph other graphs call like a node: one Input node, one Output node, and every node in between runs. It can be drawn right to left. |
| Events | procedural | Callbacks an application framework calls - Start, an update on every frame, and the rest of what the framework offers. An Events graph can also be a form's code-behind. |
| Routine | procedural | Steps in order: one Begin, statements along execution wires, and Return. Loops and branches live here. |
| Components | declarative | A class of objects laid out as a tree: the nodes you name are its fields, and it is made with its constructor or its static Create. A form is a Components graph. |
| Type | definition | A data structure of your own: data members, and Function or Routine graphs as its methods. It is not run on its own; other graphs make instances of it. |
| StateMachine | special (experimental) | States joined by named transitions, each guarded by a condition. Each state's behaviour is a graph of its own, and the machine's data members are what the states share. A run enters the first state, runs it, and takes the first transition whose condition holds. |
| Workflow | special (experimental) | A long-running process as steps, drawn as a flowchart: each step does something, or waits for a person's answer, a time or a signal, and its outcomes lead to the steps that follow. A run is saved at every step, so it can wait for days and pick up where it left off. |
| Freeform Flows | special (experimental) | A Flows graph drawn as circles and arrows. It runs as a Flows graph does. |
| Freeform Function | special (experimental) | A Function drawn as circles and arrows, with one circle for its inputs and one for its outputs. It is called as any Function is. |
Adding a graph
Press Ctrl+T, or Add graph… in the document outline. The Add a graph card offers the kinds under Dataflow, Procedural, Declarative, Definition and Special (Experimental), each with a sentence on what it is for. Choose one, type a Name and press Add graph; the graph is added to the document and opens. A graph added without a name is named after its kind - Function, then Function 2 - and a name may hold spaces, punctuation and any letters: it is for reading.

A graph that runs on an application framework brings that framework's package with it: an Events graph called Loop, added to a document that does not reference the package the framework comes from, reads Added Loop and declared Event Applications on the status bar. One Ctrl+Z takes back both.
In the outline, click a graph to show it, or right-click it for Rename…, Set as entry, Duplicate and Delete…. Duplicate adds a copy of the graph under it - Process 2 beside Process - with its nodes, comments and groups, and shows it. F2 asks for a new name for the graph on screen. The outline also lists each graph's data members and local variables under it, with their types: click one to bring its graph forward with the member's node selected.
The entry graph and what Run runs
The entry graph is where a run of the document starts, and the outline marks it entry. A new document's entry graph is of the kind chosen on the Choose a workload card and named after it, in the editor's language - Flows, or Routine. Right-click another graph and choose Set as entry to move the mark - to a Flows, Function, Events, Routine, StateMachine, Workflow or Freeform graph; a Components graph that is a form can be the entry too, while a Type is never one.
Run runs the graph in front, and the entry graph when the Document graph itself is in front - in both run modes. So one part of a document is tried on its own by bringing it forward and pressing F5. Divooka Player, stew and a published program always start at the entry graph.
Functions
A Function is a graph with a signature, called from other graphs the way a node is.
Ctrl+T, choose Function, name itTwiceand press Add graph. Its canvas holds an Input and an Output node.- With nothing selected, the Properties panel lists the Function's Inputs and Outputs. Under Inputs press Add entry: an entry called Input, a Number, appears. Type
Valueinto its Name and pressEnter. Under Outputs do the same, naming itResult. An entry starts as a Number; for another type, click its Type and choose from the list - the common types first, each with its spelling in C# under it (Number readsdouble, Integerint, Textstring), then the types the document's nodes use. - Place an Add - the one under Number Routines in the tray - and wire the Input node's Value into both of its inputs, then its output into Result on the Output node.
- Go back to a Flows graph, press
Ctrl+Spaceand typeTwice: your Function is offered under the heading named after your document, Document Modules (Hello). Place it, and it takes a Value and gives a Result like any other node.
Renaming, retyping or reordering an entry keeps its wires, and every node calling the Function follows the change. A call shows a single output by its own name - Result - on the canvas, in Properties, in the tray and in what a run reports. A Function in another document is used the same way once this document references it - see References.
Drawn right to left
With nothing selected on a Function, Draw right to left in its Properties draws the graph as its mirror image: the values stand at the right and the Output node at the far left, and each node has its inputs on its right and its outputs on its left. It suits a graph that assembles something towards its result. Only the drawing changes - the nodes keep their places, Tidy layout still works left to right, and the switch is one step Ctrl+Z takes back - and only a Function has it. Basics › Right to Left is an example.
How a Function or a Routine runs
Runs as, in the Properties of a Function or a Routine with nothing selected, chooses how a call of it runs: as itself, the default; as Parallel, which runs the graph once for every item of a list it is given where it expects one item, on several processor threads at once, and answers the results in the list's order; or as a GPU Kernel, which runs it on the graphics card once for every element of what it is given. See GPU kernels and Parallel.
Routines
A Routine runs one statement after another, following the execution wires from Begin. Its statements are nodes with execution pins - Print Line, Branch, the loops - drawn as arrows, and the nodes without them, such as Add, run when a statement needs their value.
A loop's body hangs off its Next pin and runs once a pass; what comes after the loop hangs off Completed. This Routine prints 0, 1 and 2:
- Create a document whose entry is a Routine - on the Choose a workload card, choose General Purpose and Routine - or
Ctrl+Tand Routine in a document you have. It starts with Begin and Return. - Press
Ctrl+Spaceand typeFor: the first offer is the loop, under Procedural Programming. Place it. It counts from Start to End, both included, by Step -0,10and1unless you change them. Set End to2. - Place a Print Line. Wire Begin's Next into For's Previous, For's Next into Print Line's Previous, and For's Current Value into Print Line's Message.
- Wire For's Completed into Return's Previous, and press
F5.

It prints the same run compiled. Return ends the Routine wherever it is reached: wired after Print Line inside the body instead, it would print 0 and stop. A Routine can have several Returns.
A node that waits for its result - a call that finishes later, a Wait For - wears a blue hourglass, on the canvas and in the flowchart; its tooltip reads Waits for its result.
Local variables
A Routine can keep values of its own while it runs. With nothing selected, press Define local variable… in the Properties panel (or find Define Local Variable in the tray), name it and choose its type. The tray then offers a Get and a Set node for it. Each call of the Routine starts the variable at its starting value, or at its type's default; a list or a dictionary with no starting value starts empty, and its node reads empty.
Steps, Actions and Canvas
A Routine's tab has a Steps | Actions | Canvas switch at the top right of the canvas. Canvas is the graph as nodes and wires; Steps draws the same Routine as a flowchart, and Actions as rows of actions. All three are the same graph, so an edit in one is in the others at once, and each is one step of the undo history. The choice is kept for the document's Routines while it is open.
Steps: a flowchart
Steps draws the Routine read from the top down. It is about the order of the steps only: a pill reading Begin over the Routine's name, a card for each statement with its title and its kind, and at the end a pill reading Return - with Breakpoint under its name when it has one. No card shows a value: what a step is given is set in Properties.
- A Branch or a Switch is a fork: its paths side by side, each named on its line by the pin it hangs from - True and False for a Branch - and joined again underneath.
- A loop is a frame round its body, with a line that goes back up beside it, marked repeats.
- A Sequence's parts are numbered, one under another, in a bracket.
Press a + to put a statement there. It offers Branch, the loops and Return before you type, and what you type searches the nodes as the tray does. Drag a card onto a + to move it, and press the × on the selected card, or Delete, to take it out. Double-click a card to go to its node on the canvas; a call's card opens the graph it calls.
Select a card and its Properties show Connections - a list for each of the step's inputs, offering the outputs that can feed it, such as Greet:Text, or Not connected - and Values for what is typed. Choosing one reads Set connection on the status bar, and the card still reads only the step's title.
A statement put in after a Branch, a Switch or a Sequence goes into a Sequence that carries the fork as its first part and what follows as its second: an execution output leads to one node only, so that is where "afterwards" is written. The flowchart does not draw that Sequence as a step.
Statements that nothing leads to - what followed a Return put in the middle, for one - are still part of the Routine. They are drawn under the chart, under Not reached, with no + among them. Drag one onto a + of the flow to put it back, or wire it back in on the canvas.
Actions: rows
Actions shows the Routine as Methodox Action Maker shows a program: a row for each statement, the rows a loop or a Branch holds indented under it, and the document's data members above them, which can be created and changed there. Double-click an empty row - New action, New data member - to add one, and a filled row to change what it is given. A row selected is selected on the canvas too, so Properties shows its node, and F9 sets its breakpoint. What no row can say is a row marked in yellow and kept as it is drawn. Every node keeps its place on the canvas, and only what is new is laid out. The rows' keys and the rest are in Methodox Action Maker; an Events graph has Actions | Canvas, its events one under another.

Events
An Events graph is a set of callbacks on an application framework: you place the framework's events - Start, and the others it offers - and hang statements off them, and the framework decides when each runs. Which framework it is, is the graph's Procedural base type, shown in the Properties panel with nothing selected - BasicApplication for a new one. Click it to choose another: the list offers the frameworks of the packages the document references, so a document made from the GUI Development workload is offered its two GUI frameworks, and one that references GUI Components is offered Form Application, the base type of a form's code. An Events graph can hold Functions and Routines of its own, for its callbacks to call: with nothing selected, press Define behavior member… in its Properties. The examples in the GUI, Components Graph and Glaze categories are good ones to open - see Examples.
The tray and the node library offer an Events graph only the callbacks its own base type declares; the library lists another base type's callbacks as Not available, with the reason. A callback node its base type does not declare - one placed before the base type was changed - would never be called, so the document does not run until you delete it or change the base type back: the run is refused, naming the node, and the node is outlined in red.
A Custom Event starts a path of its own, as a function of its graph: it is called by a node of its own, with inputs and answers, it can be handed to anything that takes a function - a control's event, Run Later - and it can be what the framework runs. Renaming it renames its calls.
Components and forms
A Components graph is a class of objects laid out as a tree, its nodes drawn as titles, top to bottom, with their values set in Properties.

- Fields. Every node you give a Name in Properties is a public field of the object. A named node with one output gives a field of its own name; with several outputs, one field for each, named after the node and the output. Unnamed nodes stay private. A name must be a name a program can use, and unique; the rename card says when it is not.
- Input and Output. Place an Input and an Output node from the tray to give the class a constructor that takes the Input node's values and a static Create that takes them and answers the Output node's values. Without them it has a plain constructor.
- Making one. Other graphs make one with Make and the graph's name - Make Render Settings - and read its fields, or call Create for its answer alone.
A form is a Components graph of GUI Components' controls and layouts. Its Code-behind, in its Properties, can be None, an Events graph of the document, or a New Events graph: the Events graph, on the base type Form Application, then reads Code-behind of and the form's name, and lists the form's controls among its members under From and the form's name, each with a padlock. The two are one object, so the code reads and writes the controls directly - Get Text and Set Text take the control itself on their Control input - and renaming, retyping or removing a control in either place does it in both. A control's member cannot be deleted from the Events graph (answer cannot be deleted here: it is a control of Greeting Form), and deleting the form asks whether its Events graph goes too: Delete both, Delete the form only or Cancel. The form is what Run, Divooka Player and a published program start, and in the editor it runs in the Active Preview. Open in Methodox App Maker on the toolbar opens a document whose entry is a form in Methodox App Maker, which draws forms and their code. See Desktop GUI Applications for forms, and Components Graph › Greeting Form for an example.
Workflows
A Workflow graph is a process that can take days: a step does something, asks somebody, or waits, and the run is saved at every step. It opens as its flowchart, with Steps pressed in the Steps | Canvas switch at the top right:
- a Start pill, then a card for each step, marked by its kind - Do (runs a Routine), Ask (asks somebody a question and waits for the answer), Wait (waits for a time to pass), Wait for Signal (waits for a signal) and Decide (two ways on, by a condition);
- an Ask's answers as chips under it, and a Back to … tag with a line to the step an answer returns to;
- a Decide's two ways side by side, meeting again underneath;
- an End pill for each way the workflow can finish, and a + between steps to add one.

Select a step and its settings are in Properties: its name, what it runs or asks, and for each outcome the step it Leads to, or Nowhere, or Fails the run. Press a + to add a step there, drag a card onto another + to move it, and press its × to remove it; each is one step of the undo history (Added step Wait, Moved step Wait). The workflow's variables are in the Start pill's Properties. Canvas shows the same graph as nodes - Start, Do, Ask, Wait, Wait for Signal, Decide and End - which the tray offers under Workflow › Steps, and which a wire dragged from a step onto empty canvas offers too. Start stays where it is: a run of the workflow begins there.
Run a workflow Interpreted, and the dock's Workflows tab lists its runs: the step each is at and what it waits for, with a button for each answer an Ask offers. The chart follows the run chosen in that tab, live: a tick on each step it has passed, an amber frame on the step it is at with what it waits for at its foot - Waiting for an answer, Waiting until a time, Waiting for its signal - and Run started with its date and time at the top left. Click another run's row to see that one. A workflow is not run compiled. Special (Experimental) › Expense Approval is an example.
Freeform Flows and Freeform Function
The two Freeform kinds draw a dataflow graph as circles and arrows, as the diagrams of Elements of Parametric Design do. They run, compile and are called exactly as Flows and Function, and Special (Experimental) › Three Rooms is Woodbury's Figure 3.4 drawn as one.

- Circles. Every node is a circle of one size, with no pins, in its category's colour. A circle shows only the label you give it - double-click it to type one - and an underscore starts a subscript, so
w_treads as w with a subscript t; its Name in Properties, the name a program written from the graph uses, is never shown on it. Drag a circle by its middle to move it. - Arrows. Drag from a circle's rim to another circle. When the circle has several inputs the arrow could feed, a list at the pointer asks which, each input showing what feeds it now;
Escor a click elsewhere joins nothing. While you hold an arrow over a circle it says why it cannot join, if it cannot - takes no value, Already joined, or one circle already depends on the other - andShiftjoins anyway. Let go on empty canvas and the tray opens, then asks which input. - Bends. Drag an arrow to bend it round one point; double-click its handle to straighten it, and double-click the arrow itself to choose what it takes and what it feeds. With an arrow selected, Properties shows Takes, Feeds, Weight (Regular or Thin) and Straighten. Two arrows between the same circles bow apart. The bend and the weight are kept in the document.
- A Freeform Function has one Input and one Output circle, with their words under them; an arrow from Input asks which entry and which input, and carries the entry's name.
Ctrl+M turns the selected circles into a Freeform Function, and Expand in place on its call puts them back.
Types
A Type defines a data structure: its data members, and Function or Routine graphs inside it as its methods. Other graphs make one with its Make node - Make Point for a Type called Point - and read and set its members. With nothing selected on its canvas, Type kind in the Properties panel chooses between a Class, shared by everything that holds it; a Struct, a value that is copied; and a Record, which is built once from its members and not changed afterwards.
Renaming a Type renames everything typed by it - data members, local variables, and the Input and Output entries of Functions and Routines - as one step Ctrl+Z takes back.
The document itself is a type too, named after its file, and its own graph says which kind: see References.
Data members and starting values
A data member is a value that belongs to a type and lasts between calls - a running total, a score, a setting. The document itself is a type, so its own graph, Document, can hold data members for every graph in it to share, and so can a Type.
Click Document in the outline to show the document's own graph. With nothing selected, press Define data member… in the Properties panel. (It is also in the tray, as Define Data Member.)
The Define a data member card asks for a Name and a Type. The list starts with Number, Integer, Text and Truth, each with its C# spelling under it, then a list, an array and a dictionary of each - List of Number, Number Array, Dictionary of Text to Number and so on - then the rest of Divooka's common types and the types the document's nodes give or take. Any other type can be typed in its search, in C# (
Dictionary<string, int>) or in words. Name itTotal, choose Number and press Define. A node for the member is placed, and the tray now offers Get Total and Set Total in every graph of the document.
Select the member's node. Its Properties list its Name, its Type and its Starting value. Type
2into Starting value and pressEnter: the status bar reads Set starting value, and the node shows it.

Every run starts with Total at 2, in either mode; a Routine that prints Get Total prints 2. The cross beside the box resets it to the type's default. A list or an array takes a starting value too, element by element, and a struct part by part - a Point starting at X 1 and Y 2; a list or a dictionary given none starts empty. A Flows graph takes no data members of its own; define them on the document's graph or on a Type.
To rename a member, double-click its node's header, or select it and press F2: every node that reads or sets it follows.