Skip to content

Conversation

@efunneko
Copy link
Collaborator

PR 6: Integration, Examples & Tests

Overview

This PR adds backend integration (gateway event forwarding), example workflow configurations, and test infrastructure. After this PR, the backend is fully functional and ready for frontend visualization.

Branch Information

  • Branch Name: pr/workflows-6-integration
  • Target: pr/workflows-5c-advanced-nodes

Files Changed

Backend Integration

src/solace_agent_mesh/gateway/http_sse/component.py

Gateway modifications for workflow event forwarding:

  • Forward workflow_execution_start events
  • Forward workflow_node_execution_start events
  • Forward workflow_node_execution_result events
  • Forward workflow_map_progress events

Example Workflows

examples/agents/all_node_types_workflow.yaml (~1,150 lines)

Comprehensive example demonstrating all node types with supporting agents:

  • Echo agent, counter agent, list generator
  • Conditional, switch, loop, and map node demonstrations
  • Full working example that can be run standalone

examples/agents/jira_bug_triage_workflow.yaml (~570 lines)

Real-world example for bug triage workflow:

  • Fetch bugs from Jira
  • Categorize by severity
  • Route to appropriate handlers
  • Send notifications

Unit Tests

tests/unit/workflow/ (~1,770 lines total)

Behavior-focused unit tests for pure functions:

File Lines Coverage
test_template_resolution.py 338 Template variable resolution, nested paths, operators
test_conditional_evaluation.py 305 Condition expressions, comparisons, Argo aliases
test_dag_logic.py 314 Dependency graph, node readiness, skip propagation
test_workflow_models.py 378 Pydantic model validation, YAML parsing
test_utils.py 130 Duration parsing, utility functions
test_agent_caller.py 308 Input resolution, message construction

Integration Tests

tests/integration/scenarios_programmatic/test_workflow_errors.py (~2,000 lines)

Programmatic integration tests for error scenarios and edge cases:

  • Invalid input schema rejection
  • Node failure handling
  • Empty response handling
  • Output schema validation with retry
  • Successful workflow validation

tests/integration/scenarios_declarative/test_data/workflows/*.yaml (~550 lines)

Declarative test workflow definitions:

File Purpose
test_simple_two_node_workflow.yaml Linear 2-node workflow
test_workflow_with_structured_input.yaml Schema validation
test_conditional_workflow_true_branch.yaml Conditional true path
test_conditional_workflow_false_branch.yaml Conditional false path
test_map_workflow.yaml Map iteration
test_loop_workflow.yaml Loop iteration
test_switch_workflow_create_case.yaml Switch case matching
test_switch_workflow_default_case.yaml Switch default fallback

Key Concepts

Event Flow

Workflow Component
       │
       ├─ publish_workflow_event()
       │
       ▼
    Solace Broker
       │
       ▼
   HTTP-SSE Gateway (this PR)
       │
       ▼
     Frontend (PR 7)

Example Workflow Structure

app_type: workflow

app_config:
  agent_name: my-workflow
  namespace: my-namespace

  workflow:
    description: "My workflow"
    input_schema:
      type: object
      properties:
        query: { type: string }

    nodes:
      - id: step1
        type: agent
        agent_name: MyAgent

    output_mapping:
      result: "{{step1.output.data}}"

Adds backend integration and comprehensive test coverage:
- Gateway workflow event forwarding
- Example workflows (all_node_types, jira_bug_triage)
- Unit tests for pure functions (~1,770 lines)
- Integration tests for error scenarios (~2,000 lines)
- Declarative test workflows (8 YAML files)
- Test fixtures for workflow apps
@efunneko efunneko changed the title PR 6: Integration, Examples & Tests feat(DATAGO-114389): PR 6: Integration, Examples & Tests Dec 21, 2025
@efunneko efunneko marked this pull request as ready for review December 21, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants