Cizen v0.12.5 Cizen.Effects.Receive View Source

An effect to receive an event which the saga is received.

Returns the received event.

If the event_filter is omitted, this receives all events.

Example

perform id, %Subscribe{
  event_filter: Filter.new(fn %Event{body: %SomeEvent{}} -> true end)
}

perform id, %Receive{
  event_filter: Filter.new(fn %Event{body: %SomeEvent{}} -> true end)
}