Flux Product Docs
  • What is Flux?
  • Guides
    • Creating a Premium Video
    • Creating Your First Site
    • Creating a Countdown
    • Creating a Navigation Bar
    • Creating a Group
    • Custom 404 Page
    • Adding a Favicon to Your Site
    • Adding Videos to Your Site
    • Managing Your Guest List
    • Asset Management
    • Creating Sites from Site Templates
    • Publishing Site Versions
    • Advanced Debugging
  • Fundamentals
    • Key Concepts
    • Sites
    • Guests
    • Environments
      • Show Variables
    • Flows
      • Anatomy of a Node
      • Connecting Nodes and Building Flows
      • Passing Data
      • Scope
      • Interpolation
    • Keyboard Shortcuts
      • Keyboard Shortcuts - Page Editor
    • Animation States
    • Local Variables
    • Groups
  • Use Cases
    • For Designers
    • For Engineers
      • Custom CSS
      • Custom Modules
    • For Event Manager
      • Intercom Integration
  • Documentation
    • FAQ
    • Glossary
    • 🚀Show Controller
      • Modes
    • Domains and Subdomains
      • Hover
      • AWS Route 53
    • Premium Live Channels
    • Basic Video
    • Premium Video
      • AI Generated Subtitles
      • Supported Input Codecs and Containers
      • Supported Language Labels
      • Serverside Forensic Watermarking
    • Flow Nodes
      • Middleware
  • Modules
    • Access Code
    • Audio
    • Button
    • Carousel
    • Chat
    • Checkbox
    • Container
    • Countdown
    • Date
    • Embed
    • Image
    • Intercom
    • Link
    • Lottie
    • Page
    • Meter
    • Modal
    • Photobooth Gallery
    • Open Login
    • QR Code
    • Radio
    • Rich Text
    • Stack
    • Style
    • Spline
    • Switch
    • Text Input
    • Video
  • Template Guides
    • NatGeo FYC
      • Adding a Panel
    • Meow Wolf All Shrimps
  • 🚀Change Logs
    • July 12, 2024
    • June 08, 2024
    • April 26, 2024
    • April 12, 2024
    • March 29, 2024
    • March 15, 2024
    • March 1, 2024
    • September 2022
    • August 2022
    • July 2022
    • June 2022
Powered by GitBook
On this page
  • Flow Controllerâ„¢
  • Nodes
  • Node Types
  • Broadcaster
  • Listener
  • Middleware
  • Value
  • About
  • Flows

Was this helpful?

  1. Fundamentals

Flows

Last updated 2 years ago

Was this helpful?

Flow Controllerâ„¢

The core of the Backstage engine is the Flow Controller. Every module exposes a set of Broadcasters and Listeners. These are presented as Nodes in the Flow Controller interface. These nodes can be dragged onto the canvas, and connected together to form Flows.

Nodes

Nodes are the building blocks of the Flow Controller. They can be connected together to form behavior systems, called Flows. These can be as simple as:

When the video ends, send the user to the end page

or as complex as:

When the video ends, if the user has attended our events before, but not if they're on our mailing list, send them to the newsletter signup page.

The underlying architecture is powerful enough to build as many branches, with as many data inputs as needed.

Some nodes have an About field. This field can take the ID of a module on a page, and cause the Node to only interact with a specific instance of that module. If not provided, it will interact will all Modules of that type on all pages.

For example, a Video:ended Broadcaster Node will, by default, fire when any Video on any page ends. If provided an ID for the Video module on /end, it will only fire when that specific video player ends.

Node Types

Broadcaster

A Broadcaster node is fired when the underlying module event occurs.

For example, a Video module has the Broadcaster node Video:ended. This node fires when the currently playing video ends.

A Broadcaster node can include data which can be used for logic or to create dynamic behavior in a Listener Node.

Listener

A Listener node fires when it is pressurized by an upstream node. It triggers an action in the associated module, such as redirecting the user to a new page, or changing the source of a video player.

Middleware

A Middleware node applies logic to, or changes the input of a node. It passes the new data to its outputs.

Value

A Value node provides a value to a flow. This value can be used in downstream nodes for logic, or to apply dynamic behavior to a Listener node.

About

Flows

A Flow is formed by a series of nodes connected together, starting with at least one Broadcaster, and ending with at least one Listener.

Flows are executed when one or more Broadcaster nodes is fired. Once a Broadcaster has fired, it provides pressure to the flow.

Pressure

In order for a Flow to execute, it needs to be provided Pressure. Pressure flows from left to right in a flow.

Only Broadcaster nodes provide pressure. Value, Middleware, and other nodes do not.

Without Pressure, a Listener node will not fire.

Pressure propagates from the fired Broadcaster node to its children nodes, then on and on until it reaches a Listener node. Pressure can be blocked or redirected by Middleware nodes.

For example, we might want to redirect the user based on the value of their hasAttendee variable. We can use Middleware nodes to redirect pressure based on some criteria.

If the user variable hasAttended is false, Pressure flows to Not Equal:

If the user variable hasAttended is true, Pressure flows to Equal: