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:
- Define your goals: What computational task are you trying to accomplish?
- Identify the steps: Break down the process into discrete operations
- Determine data flow: Understand how data will flow through the workflow
- Identify required nodes: Determine what node types you'll need
Adding and Arranging Nodes
Adding Nodes
- Browse the node menu in the left sidebar
- Drag the desired node from the menu onto the canvas
- 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:
- Click on an output port of the source node
- Drag to an input port of the target node
- 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
- Click the ⚙️ (gear) icon on a node to open its configuration modal
- Fill in the required parameters
- Click "Save" to apply the configuration
File Path Configuration
When configuring file paths:
- Use the file/folder selector buttons for easy path selection
- Relative paths (
rel:
) are recommended for portability - Absolute paths (
abs:
) are useful for system-specific locations
Using Flow Variables
For dynamic configuration:
- Create a flow variable node (global or local)
- When configuring another node, check "Use Flow Variable" next to a parameter
- Select your flow variable from the dropdown
- 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:
- Node status indicators show success or failure
- Click the 📊 (chart) icon to view results for visualization nodes
- 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
- Add a ReadCsvNode to the canvas
- Configure it to read your input CSV file
Step 2: Add Data Processing
- Add a FilterNode to the canvas
- Connect the output of ReadCsvNode to the input of FilterNode
- Configure FilterNode with your filtering criteria
Step 3: Create Visualizations
- Add a BarChartNode to the canvas
- Connect the output of FilterNode to the input of BarChartNode
- Configure the chart parameters (x-axis, y-axis, title, etc.)
Step 4: Save Results
- Add a WriteCsvNode to the canvas
- Connect the output of FilterNode to the input of WriteCsvNode
- Configure the output file path
Step 5: Execute and Verify
- Click the ▶️ button to execute the workflow
- View the chart by clicking the 📊 icon on BarChartNode
- Check that the output CSV file has been created
Saving and Loading Workflows
Saving Workflows
- Click the 💾 (Save) button in the toolbar
- Specify a filename and location (defaults to your working directory)
- Click "Save"
Loading Workflows
- Click "Setup" in the toolbar
- Go to the "Load Existing" tab
- Drag and drop your workflow file or click to browse
- Configure working directory if needed
- 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: