Skip to main content

How do I interact with my Processes from a button or slider in my Interface?

Interacting with a Process from an Interface opens up many possibilities to run complex logic and Actions.

In Ctrl Suite, this is achieved by exposing an Input within the Process to the broader system to be triggered by the interface; the interface sees this Input as a Function.

You can expose these inputs using the Advanced > Input blocks in visual processes and both ‘module.exports.’ or ‘engine.output(‘out1’,data)’ in code processes.

Visual Processes

  • Navigate to your process.
  • Add an Input block (found under the Advanced heading on the left of the window).
  • Give the input block a unique name.
  • Navigate to the Interface and drag the Component you want to interact with the Process (i.e. button, slider, stepper) onto the interface.
  • Select the component.
  • Navigate to Protocols and select Process.
  • Give this a name, select your Process Node, and the Function exposed by the Input block. An optional Payload can be added here too.
  • Done!

Find out more about Input bocks here.

Code Processes

To export a function from a Code Process, use standard JavaScript functions within the process:

'module.exports.' or 'engine.output(‘out1’,data)'.

Following the function’s being exported from the process:

  • Navigate to the Interface and drag the Component you want to interact with the Process (i.e. button, slider, stepper) onto the interface.
  • Select the component.
  • Navigate to Protocols and select Process.
  • Give this a name, select your Process Node, and the Function exposed by the Input block. An optional Payload can be added here too.
  • Done!