Skip to main content

Building Workflows

This guide walks you through the process of creating more complex and useful workflows in BoCoFlow.

Planning Your Workflow

Before building a workflow, it's helpful to:

  1. Define your goals: What computational task are you trying to accomplish?
  2. Identify the steps: Break down the process into discrete operations
  3. Determine data flow: Understand how data will flow through the workflow
  4. Identify required nodes: Determine what node types you'll need

Adding and Arranging Nodes

Adding Nodes

  1. Browse the node menu in the left sidebar
  2. Drag the desired node from the menu onto the canvas
  3. Position the node where you want it on the canvas
tip

Organize nodes logically from left to right, following the flow of data processing.

Node Organization

For complex workflows:

  • Group related nodes together spatially
  • Leave space between different functional sections
  • Consider adding flow control nodes with descriptive variable names to document workflow logic

Creating Connections

Connect nodes to establish the flow of data:

  1. Click on an output port of the source node
  2. Drag to an input port of the target node
  3. Release to create the connection
note
  • Input ports are usually on the left side of nodes
  • Output ports are usually on the right side of nodes
  • Ports will highlight when a valid connection is possible

Connection Rules

  • You can only connect output ports to input ports
  • Flow control ports (top of node) can only connect to other flow control ports
  • Regular ports (sides of nodes) can only connect to other regular ports
  • A port may accept multiple connections depending on the node type

Configuring Nodes

Basic Configuration

  1. Click the ⚙️ (gear) icon on a node to open its configuration modal
  2. Fill in the required parameters
  3. Click "Save" to apply the configuration

File Path Configuration

When configuring file paths:

  1. Use the file/folder selector buttons for easy path selection
  2. Relative paths (rel:) are recommended for portability
  3. Absolute paths (abs:) are useful for system-specific locations

Using Flow Variables

For dynamic configuration:

  1. Create a flow variable node (global or local)
  2. When configuring another node, check "Use Flow Variable" next to a parameter
  3. Select your flow variable from the dropdown
  4. The node will use the flow variable's value at execution time

Executing Workflows

Execution Methods

  • Full Workflow: Click the ▶️ (Play) button in the toolbar to execute the entire workflow
  • Single Node: Click ⚙️ on a node, then click "Execute" to run just that node

Execution Order

  • Nodes execute in dependency order (predecessors before successors)
  • Nodes with no dependencies execute first
  • Nodes with the same level of dependency may execute in parallel

Handling Execution Results

After execution:

  1. Node status indicators show success or failure
  2. Click the 📊 (chart) icon to view results for visualization nodes
  3. Check the log panel at the bottom for execution details

Example: Data Processing Workflow

Let's build a workflow that reads CSV data, filters it, and visualizes the results:

Step 1: Set Up Data Source

  1. Add a ReadCsvNode to the canvas
  2. Configure it to read your input CSV file

Step 2: Add Data Processing

  1. Add a FilterNode to the canvas
  2. Connect the output of ReadCsvNode to the input of FilterNode
  3. Configure FilterNode with your filtering criteria

Step 3: Create Visualizations

  1. Add a BarChartNode to the canvas
  2. Connect the output of FilterNode to the input of BarChartNode
  3. Configure the chart parameters (x-axis, y-axis, title, etc.)

Step 4: Save Results

  1. Add a WriteCsvNode to the canvas
  2. Connect the output of FilterNode to the input of WriteCsvNode
  3. Configure the output file path

Step 5: Execute and Verify

  1. Click the ▶️ button to execute the workflow
  2. View the chart by clicking the 📊 icon on BarChartNode
  3. Check that the output CSV file has been created

Saving and Loading Workflows

Saving Workflows

  1. Click the 💾 (Save) button in the toolbar
  2. Specify a filename and location (defaults to your working directory)
  3. Click "Save"

Loading Workflows

  1. Click "Setup" in the toolbar
  2. Go to the "Load Existing" tab
  3. Drag and drop your workflow file or click to browse
  4. Configure working directory if needed
  5. Click "Load Workflow"

Best Practices

  • Use descriptive node names when available
  • Add documentation using node descriptions
  • Test incrementally by executing parts of the workflow
  • Use flow variables for parameters that might change
  • Organize spatially to reflect the logical flow
  • Save frequently to avoid losing work

Next Steps

Now that you know how to build workflows, learn more about: