Overview
Step types are handlers that execute specific step configurations. Each type has a dedicated executor ininternal/executor/.
Steps to Add a New Step Type
1. Define the Type Constant
Add tointernal/core/types.go:
2. Add Step Fields (if needed)
Add fields tointernal/core/step.go:
3. Create the Executor
Createinternal/executor/mynew_executor.go:
4. Register in Dispatcher
Updateinternal/executor/dispatcher.go:
5. Add Validation
Updateinternal/parser/validator.go:
6. Write Tests
Createinternal/executor/mynew_executor_test.go:
Example: Custom Notification Step
Best Practices
- Always render templates before using step fields
- Support context cancellation via
ctx.Done() - Return meaningful errors with context
- Export useful values via StepResult
- Write comprehensive tests
- Add validation rules for required fields
Next Steps
- Adding Runners - Custom execution environments
- Adding Functions - Utility functions
- Architecture - System overview
