Process Execution & Triggering
DataCards provides manual process triggering through different interfaces depending on your current view. You can control when and how your interconnected notebooks execute, giving you full control over your data processing workflows.
How Process Triggering Works
DataCards offers three main ways to trigger process execution:
1. Logic View - Global Execution
In the Logic View, you can trigger processes from any notebook node:
- Global execution from a notebook node triggers all outgoing processes after that node
- This allows you to start execution from any point in your process chain
- All dependent notebooks downstream will execute in sequence
2. Notebook View - Auto Play
In the Notebook View, you have granular control:
- Auto play button triggers the entire process chain
- Individual cell execution for precise control
- Upstream and downstream cell execution options
3. Deck View - Interactive Execution
In the Deck View, you can trigger processes through interactive cards:
- Input cards (sliders, toggles, buttons etc.) can trigger process execution when values change
- Interactive elements provide real-time control over your processes
- Visual feedback shows results immediately as you interact with cards
Deck View Execution
Interactive Process Triggering
The Deck View provides the most user-friendly way to trigger processes through interactive cards:
Input Cards that Trigger Execution:
- Sliders (integer, float) - trigger execution when values change
- Toggle switches - trigger execution when toggled on/off
- Radio groups - trigger execution when selection changes
- Buttons - trigger execution when clicked
- Combobox - trigger execution when selections change
How it Works:
- User interacts with an input card on the deck
- Card publishes a variable with the new value
- Consuming notebooks automatically execute
- Output cards update with new results
- Visual feedback is immediate and real-time
Example: Interactive Dashboard
# Input card notebook - publishes when slider changes
datacards.publish.card(
type="intSlider",
label="Temperature",
min_value=0,
max_value=100,
variable_key="input.temperature",
span_rows=1,
span_columns=2
)
# Processing notebook - executes when temperature changes
temperature = datacards.consume.variable.input.temperature()
comfort_level = "Hot" if temperature > 80 else "Comfortable" if temperature > 60 else "Cold"
datacards.publish.variable("analysis.comfort", comfort_level)
# Output card notebook - updates when comfort level changes
comfort = datacards.consume.variable.analysis.comfort()
datacards.publish.card(
type="text",
label="Comfort Level",
value=comfort,
span_rows=1,
span_columns=2
)User Experience:
- User moves the temperature slider on the deck
- Processing notebook automatically executes
- Text card immediately updates with new comfort level
- All happens in real-time without manual intervention
Logic View Execution
Global Execution from Notebook Nodes
In the Logic View, each notebook is represented as a node. You can trigger execution from any node:
- Select a notebook node in the Logic View
- Click the global execution button (play icon)
- All outgoing processes from that node will execute
- Dependent notebooks downstream will run in sequence
This is particularly useful for:
- Testing specific parts of your process
- Debugging by starting from a known good state
- Partial execution without running the entire workflow
Process Flow Visualization
The Logic View shows the connections between notebooks, making it easy to understand:
- Which notebooks depend on others
- The execution order
- Where to start execution for specific results
Notebook View Execution
Auto Play Button
In the Notebook View, the auto play button provides process-wide execution:
- Open any notebook in the process
- Click the auto play button (typically in the toolbar)
- Entire process chain executes from that point
- All dependent notebooks run automatically
Individual Cell Execution
For more precise control, you can execute individual cells:
- Run single cells to test specific code
- Run cell ranges for partial execution
- Execute upstream cells to prepare dependencies
- Execute downstream cells to continue processing
Important: Just because something works in individual cell execution doesn’t mean it will work in process execution mode. Process execution runs notebooks in a different context with different variable scopes and execution order. Always test your complete process flow to ensure everything works correctly in the actual execution environment.
Upstream and Downstream Execution
DataCards allows you to run cells in different directions:
Upstream Execution:
- Runs cells that this notebook depends on
- Prepares all necessary data and variables
- Ensures dependencies are satisfied
Downstream Execution:
- Runs cells that depend on this notebook
- Continues the process chain
- Propagates results to dependent notebooks
Execution Status and Monitoring
Visual Indicators
DataCards provides clear visual feedback as a dot in the top right corner of the notebook:
- 🟢 Green: Notebook/cell executed successfully
- 🔴 Red: Execution failed
- ⚪ Gray: Not yet executed
Advanced Execution Patterns
Selective Execution
Use Logic View to execute only specific parts of your process:
Data Collection → Processing A → Processing B → Visualization- Execute only Processing A → Visualization by starting from Processing A
- Skip Data Collection if data hasn’t changed
Incremental Development
Develop and test notebooks incrementally:
- Develop Notebook A, test with individual cells
- Develop Notebook B, test with upstream execution from A
- Develop Notebook C, test with upstream execution from A and B
- Test full process with auto play
Debugging Workflow
Use execution control for effective debugging:
- Identify the problem area in Logic View
- Start execution from a known good state
- Execute step by step to isolate the issue
- Fix and re-test from the appropriate point