Configuration
Global Configuration
Operandi.configure do |config|
# Type enforcement
config.require_arg_type = true # Require type option for all arguments
config.require_output_type = true # Require type option for all outputs
# Transaction settings
config.use_transactions = true # Wrap each service in a database transaction
# Error behavior
config.load_errors = true # Copy errors to parent service in context chain
config.break_on_error = true # Stop step execution when an error is added
config.raise_on_error = false # Raise an exception when an error is added
config.rollback_on_error = true # Rollback transaction when an error is added
# Warning behavior
config.load_warnings = true # Copy warnings to parent service in context chain
config.break_on_warning = false # Stop step execution when a warning is added
config.raise_on_warning = false # Raise an exception when a warning is added
config.rollback_on_warning = false # Rollback transaction when a warning is added
endDefault Values
Option
Default
Description
Per-Service Configuration
Per-Call Configuration
Configuration Precedence
Common Configuration Patterns
Strict Mode for Critical Services
Fire-and-Forget Services
Background Job Services
Type Enforcement (Enabled by Default)
Disabling Transactions
What's Next?
Last updated