Skip to content

Feat: Implement conditional workflows with JSON path validation#20

Merged
teemow merged 2 commits intomainfrom
teemow-conditional-workflows
Jul 2, 2025
Merged

Feat: Implement conditional workflows with JSON path validation#20
teemow merged 2 commits intomainfrom
teemow-conditional-workflows

Conversation

@teemow
Copy link
Member

@teemow teemow commented Jul 2, 2025

  • Add WorkflowCondition and WorkflowConditionExpectation types to support conditional step execution
  • Implement condition evaluation logic in WorkflowExecutor with success and JSON path validation
  • Add JSON path navigation and value comparison for content-based conditions
  • Enhance execution tracking to handle condition results and skipped status
  • Update API adapter to parse condition and json_path fields during workflow creation
  • Add comprehensive BDD scenario testing conditional workflows with service existence checks
  • Support template variables in both condition arguments and JSON path expectations
  • Maintain backward compatibility for existing workflows without conditions

This enables dynamic workflow execution where steps can be conditionally executed
based on runtime state evaluation, supporting both tool success/failure checks
and specific response content validation via JSON path expressions.

teemow added 2 commits July 2, 2025 17:36
- Add WorkflowCondition and WorkflowConditionExpectation types to support conditional step execution
- Implement condition evaluation logic in WorkflowExecutor with success and JSON path validation
- Add JSON path navigation and value comparison for content-based conditions
- Enhance execution tracking to handle condition results and skipped status
- Update API adapter to parse condition and json_path fields during workflow creation
- Add comprehensive BDD scenario testing conditional workflows with service existence checks
- Support template variables in both condition arguments and JSON path expectations
- Maintain backward compatibility for existing workflows without conditions

This enables dynamic workflow execution where steps can be conditionally executed
based on runtime state evaluation, supporting both tool success/failure checks
and specific response content validation via JSON path expressions.
- Add condition field to workflow step schema in API tool specifications
- Include complete condition structure with tool, args, expect fields
- Add json_path support for content-based condition validation
- Regenerate schema.json to include conditional workflow specifications
- Ensure condition field appears in core_workflow_create, core_workflow_update, and core_workflow_validate tools

This completes the conditional workflows implementation by making the condition
field available in the generated API schema for external tool consumers.
@teemow teemow self-assigned this Jul 2, 2025
@teemow teemow requested a review from a team as a code owner July 2, 2025 15:47
@teemow teemow merged commit 2e6451c into main Jul 2, 2025
2 checks passed
@teemow teemow deleted the teemow-conditional-workflows branch July 2, 2025 15:53
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.

1 participant