Documentation for a newer release is available. View Latest

Behaviour Extension Points

Behaviour extension points provide a mechanism for supplying a number of settings that your flows can use during processing.

In order to include behaviour extensions in your flow definition, you must implement the 'BehaviourExtensions' interface and then supply this implementation to your domain via the extension provider. Please refer to the add extensions section for more details.

Default implementations of all of the methods in the behaviour extensions interface are provided in the 'DefaultBehaviourExtensions' class. Extension of this class is not recommended, and should only be done if modification of specific method implementations is required.

The functionality provided by the behaviour extensions interface is outlined below.

MethodName Description Default Functionality

shouldSnapshot

Determines whether the flow should perform a snapshot on the specified received event.

No snapshotting.

deleteEventsOnSnapshot

If the flow determines it should snapshot, this decides whether the existing events should be purged from the journal leaving only the snapshot behind.

Events remain

retentionCriteria

An extension of deleteEventOnSnapshot; this enables defining a retention period for the events after which they are purged.

No period defined.

eventAdapter

Provides the ability to specify an Akka event adapter

Use default akka implementation

onEventPersistenceForwarder

Provides the ability to supply a function that will be invoked every time an event is persisted.

No additional function.

Behaviour extensions can be added at the flow level or model level.

For more information on snapshotting and purging, please refer to the How Do I Enable Persistence Purging? section.