registerWith

public void registerWith(BoundedContext context)

Registers itself as an event dispatcher with the parent BoundedContext}.

Customizes event routing to use first message field.

Registers with the CommandBus for dispatching commands (via delegating dispatcher).

Registers with the IntegrationBroker for dispatching external events and rejections.

Ensures there is at least one handler method declared by the class of the managed process manager:

  • command handler methods;
  • domestic or external event reactor methods;
  • domestic or external rejection reactor methods;
  • commanding method.

Throws an IllegalStateException otherwise.

Parameters

context

the Bounded Context of this repository

Throws

if the Process Manager class of this repository does not declare message handling methods