fix: workflow with separate steps example#6583
Conversation
- Modified stepTwo to remove +1 increment, allowing both even and odd inputs to produce different results - Updated stepOne to track original input parity with isOriginalOdd boolean - Changed stepTwo logic to conditionally increment based on original input parity - Now workflow can return both even and odd results based on user input: - Even inputs → isEven: true - Odd inputs → isEven: false - Fixed mathematical formula from 6x+3 (always odd) to 6x (even when x is even)
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
@shubhamV123 is attempting to deploy a commit to the Mastra Team on Vercel. A member of the Team first needs to authorize it. |
Description
🎯 Problem
new Step,new Workflow)✅ Solution
🔄 API Changes
Before (Legacy API):
After (Current API):
📊 Results
🧪 Testing
isEven: trueisEven: false📝 Files Changed
examples/workflow-with-separate-steps/src/mastra/workflows/index.tsexamples/workflow-with-separate-steps/src/index.tsType of Change
Checklist