CommandMatch

works.iterative.workflow.CommandMatch
final case class CommandMatch[Command](label: String, matcher: PartialFunction[Command, Unit])

A named command matcher — "which command" as a named PartialFunction matcher.

Chosen over string triggers (drift), sample events (fixture drift), and ClassTag/TypeTest (breaks on parameterless enum cases, of which Poptávka has many). label is both the edge label and the projection's trigger key.

Value parameters

label

stable identifier for this command match; used as the edge label / trigger key

matcher

partial function defined exactly on the commands this match accepts

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def accepts(c: Command): Boolean

Total — never throws, even for a command the matcher is not defined at.

Total — never throws, even for a command the matcher is not defined at.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product