DRAKON Language Reference
An Action icon is a command or an order to do something.
A Question icon can be answered as either Yes or No. The Yes and No labels can be swapped from the context menu, if you right-click on the Question icon.
A Formal parameters icon lists the inputs for the algorithm. For example, in order to build a route, we need to know the start and the destination.
A Comment icon explains something to the reader. It can be ignored during execution of the procedure.
A Choice icon contains a question that may have several specific answers, not just a Yes and a No. An empty Case icon on the right side means "all other answers".
An Insertion icon points at another DRAKON flowchart which is defined elsewhere. In this example, we start the procedure "Publish report" and wait until it finishes.
A For loop icon can be used for either of two things:
- Apply the same action to several objects.
- Repeat the same action several times.
The Concurrent processes macro-icon specifies two or more parallel paths of execution.
An Input icon receives data from the outside world. It has two parts: upper and lower.
The upper part contains a key word or a key phrase. Usually, it is based on a verb.
The lower part contains the object or some descriptive information. Usually, it is based on a noun.
An Output icon sends data or a command to the outside world. Just like the Input icon, the Output icon has two parts: one for a verb-based key phrase and one for descriptive information.
A Simple input icon also receives data from the outside world like the normal Input icon. However, it has only one part.
A Simple output icon also sends data or a command to the outside world like the normal Output icon. However, it has only one part.
A Shelf icon can have several meanings.
|Meaning||Upper part||Lower part|
|Send an order to an actor||An actor. For example, the accountant.||An order to an actor. For example, Print out the invoice|
|Send a message from a sender to a receiver||The sender and the receiver. For example, from browser to app server.||A message to send, for example, Request "Logon with Facebook"|
|Perform an action on an object||An action key phrase||The object that the action will be performed on|
|Assign a value to a variable||A variable||A value to put into that variable|
A Process icon controls a parallel process. The upper part of a Process icons can have one of the following commands: Start, Pause, Continue, Stop.
The newly started parallel process runs in the background. The algorithm of the parallel process is defined in another DRAKON flowchart. The execution of the current flowchart resumes immediately, without waiting for the parallel process to complete. Communication with the parallel process can be carried out through Input and Output icons.
A Start of control period defines the beginning of a critical procedure that needs to complete within a specified period of time. The time period is written inside the icon.
An End of control period icon defines the end of the critical procedure.
A Duration icon is attached from the left to some other icon. Depending on the context, a Duration icon can have one of these meanings:
- If there is a Timer icon above, the Duration icon with text "10 sec" means "Run this action after 10 seconds since the start of the timer." (Take this action after some period of time.) This is typical for programming.
- If there is no Timer icon, the Duration icon with text "10 sec" means "Carry out this action for 10 seconds." (The duration of a single action.) This is typical for medical procedures.
A Pause action delays the next action. The time of the delay is written inside the Pause icon.
A Timer icon works together with Duration icons.
- A Timer icon starts the timer. The icon contains the name of the timer.
- Below the Timer icon, there should be one or more Duration icons that reference the name of the timer. The Duration icons schedule certain actions at certains moments of time since the start of the timer.
A Group duration icon specifies that a certain set of actions must be completed within a specified period of time.