# What all happens when a command is invoked?
When a non-event sourced command is invoked:
- pre-conditions are validated
- command code is executed
- output returned to the caller (for synchronous calls)
When an event sourced command is invoked:
- pre-conditions are validated
- command code is executed
- event(s) raised
- i.e. saved in event-stream
- event counter is updated
- write-handler gets executed
- event gets published onto the event bus
- event stable number gets updated
- output returned to the caller (for synchronous calls)
Note: post condition gets executed at the end only in test-cases