commanded v0.10.0 Commanded.ProcessManagers.ProcessManager behaviour

Behaviour to define a process manager

Summary

Callbacks

Mutate the process manager’s state by applying the domain event

Process manager instance handles the domain event, returning commands to dispatch

Is the process manager interested in the given command?

Types

command()
command() :: struct
domain_event()
domain_event() :: struct
process_manager()
process_manager() :: struct
process_uuid()
process_uuid() :: String.t

Callbacks

apply(process_manager, domain_event)

Mutate the process manager’s state by applying the domain event

handle(process_manager, domain_event)

Process manager instance handles the domain event, returning commands to dispatch

interested?(domain_event)
interested?(domain_event) ::
  {:start, process_uuid} |
  {:continue, process_uuid} |
  {:stop, process_uuid} |
  false

Is the process manager interested in the given command?