Response

final case class Response[+R, +E, +N, +A](result: Decision[R, E, A], notifications: Chain[N])

Representation of programs that decide and emit notifications

This adds capability of emiting notifications/integration events to Decision programs

Type parameters:
A

output type

E

domain event type

N

notification type

R

rejection type

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

inline def >>[R2 >: R, E2 >: E, N2 >: N, B](f: A => Response[R2, E2, N2, B]): Response[R2, E2, N2, B]
inline def as[B](b: B): Response[R, E, N, B]
def flatMap[R2 >: R, E2 >: E, N2 >: N, B](f: A => Response[R2, E2, N2, B]): Response[R2, E2, N2, B]
def map[B](f: A => B): Response[R, E, N, B]
def publish[N2 >: N](ns: N2*): Response[R, E, N2, A]

Adds notification without considering decision state

Adds notification without considering decision state

def publishOnRejection[N2 >: N](ns: N2*): Response[R, E, N2, A]

publishes these notifications if this program result is rejected

publishes these notifications if this program result is rejected

def publishOnRejectionWith[N2 >: N](f: Type[R] => Seq[N2]): Response[R, E, N2, A]

If it is rejected, uses given function to decide what to publish

If it is rejected, uses given function to decide what to publish

def reset: Response[R, E, N, A]

Clears all notifications so far

Clears all notifications so far

Inherited methods

Inherited from:
Product