conductor-oss / conductor-oss/conductor
Epic: Implement simplified syntax for FORK_JOIN_DYNAMIC (Q4 Roadmap 2.2)
- Dominant language
- Java
- Stars
- 32.2k
- Forks
- 1k
- Avg merge
- 2d
- Merged PRs (30d)
- 33
Description
# FORK_JOIN_DYNAMIC: Implement Simplified Syntax
## Context
FORK_JOIN_DYNAMIC currently requires full WorkflowTask definitions for each forked task, creating dramatically complex and verbose workflow definitions. This makes dynamic parallelism difficult to adopt, increases the likelihood of developer errors, and creates high cognitive overhead. A simplified syntax would dramatically improve developer experience and make dynamic fork patterns accessible to more users.
## Current State vs. Desired State
**Current:**
- Requires full WorkflowTask definitions for each forked task
- Dramatically complex and verbose workflow definitions
- High cognitive overhead for developers
- Difficult to adopt dynamic parallelism patterns
- Increased likelihood of configuration errors
**Desired:**
- Simplified syntax: `{taskReferenceName, type, name, inputParams}`
- 50-70% LOC reduction for typical use cases
- Automatic construction of full WorkflowTask from simplified input
- Backward compatible with full WorkflowTask definitions
- Support for mixed syntax (simplified + full in same workflow)
## Technical Scope
### What Needs to Be Implemented
- [ ] Add simplified syntax parser for FORK_JOIN_DYNAMIC tasks
- [ ] Support simple object format: `{taskReferenceName, type, name, inputParams}`
- [ ] Automatically construct full WorkflowTask from simplified input
- [ ] Maintain backward compatibility with existing full WorkflowTask definitions
- [ ] Support mixed syntax (some simplified, some full definitions in same workflow)
- [ ] Add validation for simplified syntax with clear error messages
### Implementation Approach
Port simplified syntax support from Enterprise. Add parser that accepts simplified object format and automatically constructs full WorkflowTask definitions. Ensure backward compatibility with existing full syntax.
### Files/Components Affected
- `ForkJoinDynamic.java` (add simplified syntax parser ~80 lines)
- WorkflowTask parser/builder
- Task definition validation logic
- Workflow execution engine (task construction)
### Dependencies
- No blocking dependencies on other issues
- High-visibility improvement addressing long-standing community feedback
## Related Issues
- Fixes #20 - FORK_JOIN_DYNAMIC simplified syntax request
## Success Criteria
- [ ] Workflow definitions reduced by 50-70% LOC for typical dynamic fork use cases
- [ ] Simple object format works correctly for all task types
- [ ] Full WorkflowTask definitions continue to work unchanged (backward compatibility)
- [ ] Mixed syntax workflows execute correctly (simplified + full in same workflow)
- [ ] Validation provides clear, actionable error messages for invalid syntax
- [ ] No performance regression from current implementation
- [ ] Documentation includes before/after examples showing LOC reduction
## Testing Requirements
- [ ] Unit tests for simplified syntax parser
- [ ] Unit tests for WorkflowTask construction from simplified syntax
- [ ] Integration tests with simplified syntax workflows
- [ ] Integration tests with mixed syntax scenarios (simplified + full)
- [ ] Backward compatibility verification for existing full syntax workflows
- [ ] Error handling tests for invalid simplified syntax
- [ ] Performance regression tests
- [ ] Validation tests for all task types with simplified syntax
## Documentation Needs
- [ ] Simplified syntax specification and reference
- [ ] Before/after examples showing LOC reduction
- [ ] Migration guide from full to simplified syntax
- [ ] Best practices for syntax selection (when to use simplified vs. full)
- [ ] Examples demonstrating mixed syntax usage
- [ ] Release notes highlighting simplified syntax feature
- [ ] Troubleshooting guide for common syntax errors
## Scope Notes
**Backward Compatibility Critical:** Existing workflows using full WorkflowTask definitions must work unchanged. This is non-negotiable - any breaking changes would disrupt production workflows.
**High Visibility:** This addresses issue #20, a long-standing community request. Good documentation with before/after examples will showcase the improvement and drive adoption.
**Community Impact:** Simplified syntax dramatically lowers the barrier to entry for dynamic parallelism patterns, making this feature accessible to more developers.
**Per Strategy Doc:** Viren acknowledges low usability in current implementation. This fix directly addresses that feedback.
Contributor guide
Assessment
This issue has not been assessed yet.