Skip to content

Strategy graph

In Structure, most of a strategy is built in its graph. This is where you wire together the values, logic, and validation that shape the revision’s behavior.

Opening your strategy will lead you on this view

Strategy revision view with details on the left, graph in the center, and panes on the right.

The strategy view is composed of three distinct panes.

  • Details on the left: Where you edit the name, description and tags of your strategy, switch or create revisions.
  • Canvas in the center: This is where you build or visualize your strategy’s logic.
  • Settings panes on the right: Where you define various settings that don’t belong on a graph.

When you are building your strategy, some validation errors may show up. The error pane at the bottom will show up red.

A graph validation error shown in the strategy editor.

Clicking on it will expand it, revealing details on the failure that occured.

Expanded graph validation error describing a memory-slot type mismatch.

In this example, the issue is that a numeric memory-slot type is being fed an integer value. Fixing it is simple, we just need to feed a ConstDecimal instead of a ConstInteger in the Memory Write node.

Corrected graph output where the quantity label can be used in the actions pane.

Every strategy opens in the special Draft revision by default. In this special revision, you can edit the strategy to your liking and create a new revision if there are no validation errors.

Selected draft revision

Because revisions are immutable, attempting to do any meaningful edit to it will trigger a divergence warning.

This warning indicates that whatever is currently on your draft revision is incompatible with the change you are trying to make, and that continuing will override your current draft. If your draft is empty or doesn’t contain anything meaningful you can safely proceed, but if it contains important WIP you may want to finish work on your draft and create a new revision.

A divergence error message

Inside a source-event container, each disconnected starting node acts as the beginning of its own graph path. When that source event fires, Structure evaluates each of those graph paths independently.

From each starting node, logic then flows outward through the connected nodes. You can think of it as Structure starting at every root node in the container, then following each branch through the graph until all connected logic has been evaluated.

The strategy graph is the main workspace for building a revision. If the graph is clear and valid, the rest of the strategy is much easier to understand.

Once the graph is in place, the next question is how the revision moves between recognizable modes. That is the focus of State machines.