Take your automation to the next level with the Workflow feature. You can create complex logic and automations by combining actions, feedbacks, variables, and utility nodes. Build custom behaviors that respond to your specific needs! Workflows also support custom variables and expression-based logic for maximum flexibility.
The anatomy of a Workflow Node
Each Node will look differently but there are some common features. Down the left side of the node there may be some yellow and/or white dots, these are input connections and similarly down the right side of the node there may be a number of yellow and/or white dots and these are output connections. The yellow dots are Event connections and the white are Value connections Some nodes will require a connection to be made and some will offer the connection as an option for setting the value, these inputs are vertically aligned with the option they will set. Typically a yellow dot which is not aligned with a settings box will trigger the whole node to preform something when a change is detected on the input. Any Inset colored dot aligned with a connection selection (green, yellow, red) will indicate the state of the connection hopefully it will be green indicating that the connection is connected and ok.If a Node has a red outline and a red warning triangle there is something wrong with the node configuration or connection and will possibly keep the workflow to function as expected
Value
Values are the main way of connecting nodes. It provides a deterministic way of dealing with conditions and logics. You can use utility nodes to alter them and chain them together, to create reactive behaviour.
Event
Events are processed individually, and can be used to trigger actions at a specific point in time. They can accept both values and other events. When a value is connected, it will respond whenever the value changes.
Variable Types
Variables are often divided in to the type of content they can hold, this is called data type or often just type In buttons we use 4 different data types.
- String: The string variable is sort of a "catch all" and will contain anything not explicitly belonging in any of the other data types. The String variable can be empty.
- Number: If you need to do number operations with a variable, like math operations, enumerating or counting you should be using the Number type of variables. A number variable can not be empty.
- Boolean: The boolean variable is used for strictly logical values and can only hold 1 of 2 values it's either true or false. The Boolean variable can not be empty.
- Connection type: The Connection type variable is a specialty variable in buttons, and will hold a reference to any of the configured connection on the system. The variable is used to programmatically swop connections in buttons. Not to be confused with the Connection variable which is a set of variables tied to, and coming from the configured connections.
Connection
Connection VariableThe Connection Variable Node allows for any variable originating from the Connection to be read in to the workflow. |
|
Connection ActionThe Connection Action Node Allows you to execute any of the connection actions available in your configuration. The Execute on change will trigger anytime any Value or Event input on the node changes. | |
Which optional inputs that will be available will depend on the connection. In the example to the right we have an Blackmagic Hyperdeck. You can also use Boolean value for turning on/off variable speed, Loop Clip, or Single clip playback.
| |
Connection FeedbackThe Connection Feedback Node is used to get a Boolean value from a connection, where the target feedback state is either true or false. |
Workflow
Workflow VariableThe Workflow variable node has a global scope, and can be utilized everywhere in Buttons. Every variable needs a unique name, and a type either string (default), number or boolean. The Node has a Event input Write allowing acceptable values for the current type of the variable, and a Value output Read which will give the current value of the variable in the type set in the workflow variable. | |
Workflow Variable ReadThe Workflow Variable Read Node, can be used to read values from any workflow variable in the configuration, either in the same Workflow, or from other Workflows. The Value will be of the type set in the variable. | |
Workflow Variable WriteThe Variable Write Node can be used to write to any workflow variable in your configuration, Either in the same workflow, or in other workflows. It has an event input that will accept any value acceptable for the receiving Workflow variable. | |
Workflow RouterThe Workflow Router Node lets you crate a router for variables, giving you the ability to route variables from a input to one, or more output with the router section, Router UI and Router presets in buttons. It can be setup with a number of inputs and and outputs. It can also be expanded with a number of levels for each of the inputs and outputs giving you the ability to route multiple variables in parallel.
|
Internal
Internal ActionThe Internal Action lets you execute a number of internal actions, The options and settings will vary between the different internal actions. | |
Internal FeedbackThe Internal Feedback Node will give you a boolean result based on the state of an internal feedback, like Route status or Connection status. |
Position
NFC ReaderThe NFC Reader Node lets you read a NFC card or key fob, either system wide or for a specified position.
|
API
OSC ListenerThe OSC Listener lets you receive OSC message from external devices or applications. you can edit the port the OSC server should be listening on, and you can create multiple Paths with or without arguments. Each path will have an Event output and a value output for the arguments contained in the OSC message. | |
Rest ServerThe Rest Server Node lets you establish a rest server within a workflow that can send and receive data to and from external devices or software. You have to set the port that the server should be listening on and you can also set a limit to the number of requests pr second. You can also setup a bearer token for authentication on the remote client/server |
Utility
Event SwitchThe Event Switch Node lets you define a number of events that will deliver a given Value to the output You can also set a Initial value which also is the Value that wil be used if you trigger the reset input. | |
Priority StackThe Priority stack node lets you determine what order the input states changed to true. This can be used to determine the winner of a race. Select from 4 strategies: Latest, Most recent, Top, or Bottom. |
|
MathThe Math node will perform basic math from 2 input values, or an input value and a static value. You can also set the Math operator with an input, if it needs to be determined at runtime, The Math Node will accept both strings, and numbers as inputs, and will perform math operations with numerical strings (Numbers cast as string type). You can also use the Math Node to recast a Numerical string to a Number type. The output value from the Math Node will be of the number type. |
|
ClampThe Clamp node will set a upper and lower limit for a numeric value, useful for situations where you have to make sure that a incoming value is not out of bounds, resulting in an error in a connection. | |
LogicThe logic node lets you compare 2 inputs, or an input and a static value. You can compare both the values, and type to make the comparison as accurate as possible. You can also use an input to select the logic operator. The output will be a boolean value. | |
Change SwitchThe change switch wil take a boolean input, and output a timestamp for each of the outputs in accordance with whether the input is true or false, allowing for multiple concurrent equal values, to repeatedly trigger a event input. Change switch will also split the true and false values to it's own outputs, acting as a trigger filter for event inputs. | |
| |
Static ValueThe static value lets you set a constant value of a given type and use it as a input for other nodes. | |
String MergeThe string merge lets you combine several strings in to one. You can also set the delimiter you want to use between the input strings. The output wil be a single string | |
CounterThe Counter node allows you to count up or down, either by triggers or a given amount on the various event inputs, You can also set a start value, and reset the counter, the output from the counter is a number. | |
DelayThe delay node lets you delay the payload through the passthrough either by a given value on the delay input or by entering the time in milliseconds in the value box | |
IntervalThe interval timer node wil output a timestamp increasing with the given Interval in milliseconds.Output as a value, and an event | |
Event OrderThe event order node will only give a true state out if the incoming events come in the given order. In reset mode the node will reset if a out of order event happens. In Wait mode the node will wait for the next in order event to come before it will allow progression. In other words Reset will enforce events only happening in the right order, while wait mode will allow for events happening in random order but will only be fulfilled when all events have happend in it's right place in the order. | |
SchedulerThe scheduler node will output a timestamp or an event increasing by the schedule The node is loosely based on Cron, a time based job scheduler in Unix like operating systems, allowing users to automate repetitive tasks—known as cron jobs—by running commands or scripts at specific, fixed intervals, times, or dates | |
State GateThe state gate will only passthrough the Payload input to the Value output if the gate is open, you can control the gate either with a state input or a set of events. There is also a fallback value that can be passed through to the value output if the gate is closed. The Is Open output will be True when the gate is open. | |
Event GateThe event gate will only passthrough the Event to the Out output if the gate is open, you can control the gate either with a state input or a set of events. The Is Open output will be True when the gate is open. | |
DisplayThe display node wil show the value, and type of the input. Making debugging easier, and giving you realtime information inside the workflow. | |
ExpressionCreate complex logic in textual form. Do math, lookups, logic operations, and more. |
iCal Automation of a video switcher
In this example, we have two connections: an iCal connection and an Atem Video switcher. The iCal connection contains a variable called event_name, and the Atem Video switcher performs an Auto transition. We follow the logic from left to right.
We retrieve the value from the Connection variable of the iCal connection and input it into a Logic node to compare it with a specific value, in this case, “test_on.” When the iCal calendar encounters an Activity with the name “test_on,” the logic evaluates to true. While we could directly pass the value to the connection event, this would trigger on all changes, including when the logic becomes false. To address this, we utilize the Change Switch to filter the output from the logic. The Change Switch now outputs a new timestamp each time the logic becomes true.
By implementing this logic, the Auto transition will only be triggered when the iCal calendar encounters an Activity with the name “test_on,” not when the activity ends and the logic becomes false again. This allows for more flexibility and control over the triggering conditions.
We can further expand this logic by adding multiple Logic nodes, each testing for a different Activity. This enables us to trigger various actions based on specific events in the iCal calendar.
Automatic Failover router
In this workflow, we utilize an internal feedback mechanism to monitor the status of a video switcher. The output of this feedback node is a Boolean value, enabling us to directly pass it to a change switch. Consequently, as long as the PCR1-Mix 1 is connected, the router will route input 12 to output 12. However, in the event that Buttons loses connection to the PCR-Mix 1, the feedback will generate a false output, prompting the router to route input 1 to output 12. While this serves as a basic example, it can be significantly expanded to automate the system in the event of component failure.
Very simple rest server
In this straightforward REST server example, we expose five endpoints that can be integrated into a webpage or accessed by external devices capable of making GET and POST requests. The four POST requests will trigger the event inputs on the event switch, thereby modifying the numeric values on the output and storing them in the houselight_scene variable using the workflow variable write node. Conversely, the GET request will enable the external webpage or device to retrieve the current value from the houselight_scene variable. This ensures that the external webpage or device remains synchronized, even if other buttons change the variable.