Documentation

Procedural Context

Use procedural context for traditional flow control logic.

Procedural Context

Recursion in Events Graph (Experimental)

An example of using recursion in Events graph in Divooka

Overview

Procedural context is used to dictate branches, loops and can form more typical sequential logic.

Example

You can use it to achieve very practical programs fairly easily. Below program uses ChatGPT complete to summarize all texts files in a folder into a single summary file.

Practical Program

All nodes are available under Basic > Procedural Programming toolbox.

The Procedural Toolbox

Execution Path

We can use Next and Previous connectors on our nodes to dictate program flow.

States

Graph variables can be set and accessed with Get XXX Variable and Set XXX Variable functions - where XXX is placeholder for variable type.

State Setters and Getters

Set Variable Example

Sequence

Sequence can be used to break apart horizontal flow into a more vertical one.

Procedural Context Sequence Node

Procedural Context Sequence Example

Branch

Branch expresses conditional execution.

Procedural Context Branch Node Procedural Context Branch Example

Repeat

Works like a traditional for loop.

Procedural Context Repeat Node

The code after "Next" will execute N times, each time with a different index.

Procedural Context Repeat Example

You can define what happens after the loop is finished:

Completed Behavior

Iterate

Given a collection of items, you can enumerate through each of them using the For Each node.

For Each Node

For Each Example

Custom Events (Callback)

We can use Custom Event to define an event, and Execute Event to issue a call.

Procedural Context Custom Event Nodes

Procedural Context Custom Event Example

Reference