docs/src/course/04-workflows/21-testing-conditional-logic.md
Let's test your conditional workflow with different types of content to see how it routes to different processing paths.
Update your Mastra configuration to include your new workflow workflows:
// In src/mastra/index.ts
import {
contentWorkflow,
aiContentWorkflow,
parallelAnalysisWorkflow,
conditionalWorkflow,
} from './workflows/content-workflow'
export const mastra = new Mastra({
workflows: {
contentWorkflow,
aiContentWorkflow,
parallelAnalysisWorkflow,
conditionalWorkflow, // Add the conditional workflow
},
// ... rest of configuration
})
You can now test this new conditional workflow in the playground. Be sure to test different content lengths and content types.
If a condition isn't working as expected:
Conditional workflows provide:
Next, you'll learn about streaming workflow results for better user experience!