You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

Flow Elements

Search results for "Flow Elements"

Logic Elements

Logic elements are a special group of components that are used to construct logic expressions used in conjunction with other flow elements. Examples of this are Decision or Filter elements.

Flows

As an alternative to traditional scripting, Structr offers a visual programming environment called Flows. A Flow consists of Flow Elements that serve different purposes ranging from querying data, processing data, controlling the execution flow and expressing logical conditions. As a whole a Flow can be called like a regular function from Scripting contexts or used as a data source for repeaters in pages.

Sidebar

The sidebar provides a tree view that displays all Flows and packages. The default “Flows” entry acts as a root element that groups all elements. Left-clicking a Flow element in the tree will load it’s content into the canvas view and set it as active. Right-clicking elements in the tree view provides a context-menu that allows access to various functions.
When the root element is right-clicked, it will provide the option to create a new Flow or package. For Flow elements the menu will provide the option to rename or delete the currently selected flow. Packages can be renamed and deleted as well as providing the option to add new child Flows or packages. Using drag-and-drop on the icon of Flows or packages, existing elements can be moved in the tree hierarchy.

Canvas

If a Flow is selected, it will be rendered on the canvas area of the Flows section. The context menu in this area provides the option to create new Flow nodes from the categories “Action Nodes”, “Data Nodes”, “Logic Nodes” and also offers shortcuts to run the active Flow as well as managing it’s layout. Each existing Flow node will be displayed with it’s type as title and the available connection sockets. The left hand side of Flow elements displays all available input sockets and output sockets are found on the opposite side.

Elements can be moved using drag-and-drop on their title bar. Drag-and-drop between an output socket of one node and the input socket of another node allows the creation of connections between Flow elements. These connections and also the respective sockets are color coded to signal their purpose and compatibility. Green connections and sockets represent execution Flows, which in turn show the path a Flow will take when being run from start to finish. The starting Flow element can be identified by it’s green title bar and elements can be set as such via the right-click context menu, if they are applicable as starting element.

Using the context menu

A complete overview over all existing flow elements can be found in the

Connection Types

Green connections between elements represent the execution flow. Blue connections between elements represent the Flow of data. Orange connections represent conditional and logic Flows that are used in conjunction with Decision elements. Brown connections represent connections between flow elements and their exception handler element.

Menu Bar

The “Highlight” selector allows highlighting the different connection types between flow elements to get an easier overview of the flow. The highlighted connection type is drawn thicker and the other types are drawn thinner while the highlighting feature is active.

Editing scripts within Flow elements