Feat: Implement conditional workflows with JSON path validation#20
Merged
Feat: Implement conditional workflows with JSON path validation#20
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.