Commit 803a6ca
authored
Implement workflow chain execution to share results between workflows (#1872)
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Added workflow chain execution so results can be shared between workflows, enabling workflows to pass data to each other during execution.
- **New Features**
- Introduced `executeWorkflowChain` to run multiple workflows in sequence and share results.
- Updated workflow runner to use the new chain execution method.
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved accuracy in counting successfully synced threads during workflow execution.
* Workflows now proceed regardless of certain environment variable settings.
* **New Features**
* Added support for executing multiple workflows in sequence with consolidated result and error reporting.
* **Refactor**
* Simplified and streamlined workflow execution logic for better maintainability.
* **Style**
* Enhanced code formatting for improved readability.
* **Documentation**
* Updated method signatures to clarify optional parameters.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 9707613 commit 803a6ca
File tree
4 files changed
+66
-41
lines changed- apps/server/src
- routes/agent
- thread-workflow-utils
4 files changed
+66
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 190 | + | |
194 | 191 | | |
195 | 192 | | |
196 | 193 | | |
| |||
522 | 519 | | |
523 | 520 | | |
524 | 521 | | |
525 | | - | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | 630 | | |
634 | 631 | | |
635 | 632 | | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
659 | 637 | | |
660 | | - | |
| 638 | + | |
661 | 639 | | |
662 | 640 | | |
663 | 641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1779 | 1779 | | |
1780 | 1780 | | |
1781 | 1781 | | |
1782 | | - | |
| 1782 | + | |
1783 | 1783 | | |
1784 | 1784 | | |
1785 | 1785 | | |
| |||
1822 | 1822 | | |
1823 | 1823 | | |
1824 | 1824 | | |
1825 | | - | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
1826 | 1829 | | |
1827 | 1830 | | |
1828 | 1831 | | |
| |||
1912 | 1915 | | |
1913 | 1916 | | |
1914 | 1917 | | |
1915 | | - | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1916 | 1921 | | |
1917 | 1922 | | |
1918 | 1923 | | |
| |||
1955 | 1960 | | |
1956 | 1961 | | |
1957 | 1962 | | |
1958 | | - | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
1959 | 1966 | | |
1960 | 1967 | | |
1961 | 1968 | | |
| |||
2023 | 2030 | | |
2024 | 2031 | | |
2025 | 2032 | | |
2026 | | - | |
| 2033 | + | |
2027 | 2034 | | |
2028 | 2035 | | |
2029 | 2036 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
86 | 126 | | |
87 | 127 | | |
88 | 128 | | |
| |||
158 | 198 | | |
159 | 199 | | |
160 | 200 | | |
161 | | - | |
| 201 | + | |
162 | 202 | | |
163 | 203 | | |
164 | 204 | | |
| |||
272 | 312 | | |
273 | 313 | | |
274 | 314 | | |
275 | | - | |
| 315 | + | |
276 | 316 | | |
277 | 317 | | |
278 | 318 | | |
| |||
0 commit comments