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.
Strategy view
Section titled “Strategy view”Overview
Section titled “Overview”Opening your strategy will lead you on this view
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.
Error pane
Section titled “Error pane”When you are building your strategy, some validation errors may show up. The error pane at the bottom will show up red.
Clicking on it will expand it, revealing details on the failure that occured.
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.
Draft, revisions and validation
Section titled “Draft, revisions and validation”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.
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.
Execution flow inside a container
Section titled “Execution flow inside a container”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.
Practical takeaway
Section titled “Practical takeaway”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.
Next step
Section titled “Next step”Once the graph is in place, the next question is how the revision moves between recognizable modes. That is the focus of State machines.