Skip to content

Basic demos

The basic demos let you follow a specific relationship between an on-screen action and an engine response. All four use small graphs: you can recognize what changes when you choose an edge, switch language, reach a terminal or try different data.

Open each demo in a browser and select EN to follow the English control names. If the demo retains an earlier execution, select Reset before starting. You can also reset to compare another result. The steps below also explain what to observe, so you can understand the relationship without running the demos.

Graph basics: choosing an edge changes the position

Section titled “Graph basics: choosing an edge changes the position”

A graph defines the possible connections in a process. A session occupies a node and advances when your application asks to traverse an outgoing edge. The graph keeps its structure while state records the new position.

We return to Graph basics, introduced in Graph-based execution model. This example has a root, node 10; an intermediate step, 20; and two terminals, 90 and 91. The numbers identify elements of this demo.

  1. At node 10, choose Go to node 20, edge 101.
  2. Observe that the current node becomes 20 and its options appear. The root is still 10.
  3. Choose Go to terminal 90, edge 201. The path records nodes 10, 20 and 90, connected by choices 101 and 201.
  4. Select Reset, then Go to terminal 91, edge 102 from the root. This execution finishes after a single transition.

The comparison shows that reaching a terminal depends on the chosen path. The engine does not have to visit every node or automatically take the first available option. The application sends the chosen edge ID and uses the response to replace the actions on screen.

At this demo’s terminals, choices for continuing disappear even though no terminal outputs are configured. The terminal node determines the end of the path. An output can add result data, as you will see below.

Graph JSON lets you compare the buttons with each edge’s from and to fields. For more on the role of each element, see Nodes, edges and terminals.

Labels and metadata: present the same position differently

Section titled “Labels and metadata: present the same position differently”

Metadata describes a node for an interface; labels give names to its edges. The application uses that data to explain the current step and present its actions.

We revisit Labels and metadata, the introductory tour used in Payloads and presentation. Node 10 welcomes the visitor, 20 contains the introduction and 90 ends the tour.

Choose Read the introduction to reach node 20. Then switch EN to ES in the header. The title changes from “Introduction” to “Introducción”, along with the subtitle, description and action text. The current node and path keep their IDs: you are reading the same position in another language.

Open Mostrar procedencia de los campos in the explanatory card (Show field provenance if you switch back to EN). The viewer connects the display to the node’s title, subtitle, description and extras, and to each edge label’s fields. For example, extras.icon: "book-open" identifies an icon the frontend knows how to draw. The engine supplies that value; the application decides which graphic it represents.

This separation lets you change wording or adapt an interface without renumbering the graph. It also explains why switching EN/ES does not add a transition. Both languages’ text is declared in the definition: Labels, metadata and languages explains how to write and select it.

Terminal outputs: receive data and act on it

Section titled “Terminal outputs: receive data and act on it”

A terminal output supplies data associated with the end of a process. Your application interprets its type and decides how to present content or use a destination.

We return to Terminal outputs, the demo linked from Terminal outputs. Its root offers four choices, each connected to a different terminal.

Action at the root What appears at the terminal What the application does
Try redirect A destination, a label and open_behavior: "same_tab". Displays a button that opens the destination in the same tab when clicked.
Try URL A URL with open_behavior: "new_tab" and no declared label. Supplies its own link text and lets you open it in another tab.
Try content A message in content. Renders that content as text within the screen.
Try mixed Content and a URL in one output. Presents the message alongside a link you can open.

Start with Try redirect. The session reaches terminal 90, but the browser stays in the demo. Compare the payload fields below the result with the Try the redirect button. Only clicking that second button makes the application open the destination.

Then reset and try URL. Its output has label: null; the link remains understandable because the application supplies fallback text. When you switch EN/ES, this route’s output stays the same because its declaration is language-neutral, while interface text can change.

This demo separates two moments: completing graph navigation and using the result. Opening an output’s link is an application action; it does not add another edge to the path.

Context and conditions: try data before confirming it

Section titled “Context and conditions: try data before confirming it”

Conditions use execution data to determine which paths can be attempted. A candidate context contains values the application proposes for an operation; a preview evaluates them before a transition is confirmed.

We revisit Context and conditions, recommended in Context updates and candidate values. This demo starts at node 10, with score: 0 and bonus: false. It offers an unconditional basic route, an advanced route requiring score >= 10, and a bonus route requiring both score >= 20 and bonus == true.

Change the values in Candidate context without choosing a route yet:

score bonus Available routes in the preview
0 false Basic.
10 false Basic and advanced.
20 false Basic and advanced; bonus still needs to be enabled.
20 true Basic, advanced and bonus.

The options change, but Confirmed context still shows the initial values and Path remains at 10. In this actual screenshot, the 20 / true candidate has been evaluated without confirming a choice:

Confirmed context with score 0 and bonus false beside candidate context with score 20 and bonus true. The candidate is still uncommitted.

Now choose the Bonus route, edge 103. The engine evaluates the candidate again for the choice and, if accepted, the session reaches terminal 92. The 20 / true values become Confirmed context, and the path includes that edge. Having three available options had not selected any of them.

Also observe the bonus route’s conditions when score is below 20. The first fails and the second can be marked Not evaluated: evaluation stops after the first failure. That indication explains what was checked; it does not say that bonus evaluated to false.

Your application can use this separation to offer forms that show an edit’s consequences before saving it. It must send the values with the choice and handle the result, because the preview does not confirm the transition. Condition evaluation and edge availability develops the availability states and their consequences.

To see decisions and presentation supplied by additional code, continue with the advanced demos. To bring these fundamentals together in a small application, follow Building a guided multi-step process.