The type of Id this orchestrator handles.
The type of Id this orchestrator handles.
We use a HashMap to ensure remove/insert operations are very fast O(eC).
We use a HashMap to ensure remove/insert operations are very fast O(eC). The keys are the task indexes.
Computes ID from the deliveryId of akka-persistence.
Computes ID from the deliveryId of akka-persistence.
Converts ID to the deliveryId needed for the confirmDelivery method of akka-persistence.
Converts ID to the deliveryId needed for the confirmDelivery method of akka-persistence.
Override this method to add extra commands that are always handled by this orchestrator (except when recovering).
Override this method to add extra commands that are always handled by this orchestrator (except when recovering).
How many tasks of this orchestrator have successfully finished.
How many tasks of this orchestrator have successfully finished. Aborted tasks do not count as a finished task.
Ensures the received message was in fact destined to be received by task
.
Ensures the received message was in fact destined to be received by task
.
User overridable callback.
User overridable callback. Its called when the orchestrator is aborted. By default an orchestrator
aborts as soon as a task aborts. However this functionality can be changed by overriding onTaskAbort
.
By default logs that the orchestrator has aborted, sends a message to its parent explaining why the orchestrator aborted then stops it.
You can use this to implement your termination strategy.
User overridable callback.
User overridable callback. Its called after every task finishes. If a task aborts then it will prevent this method from being invoked.
By default logs that the Orchestrator has finished then stops it.
You can use this to implement your termination strategy.
If a orchestrator starts without tasks it will finish right away.
User overridable callback.
User overridable callback. Its called after the orchestrator starts but before any of the tasks start.
By default logs that the Orchestrator has started.
User overridable callback.
User overridable callback. Its called every time a task aborts.
You can use this to implement very refined termination strategies.
By default aborts the orchestrator via onAbort
with a TaskAborted
failure.
Note: if you invoke become/unbecome inside this method, the contract that states "Waiting tasks or tasks which do not have this task as a dependency will remain untouched" will no longer be guaranteed. If you wish to still have this guarantee you can do
context.become(computeCurrentBehavior() orElse yourBehavior)
{ @see onTaskStart} for a callback when a task starts. { @see onTaskFinish } for a callback when a task finishes.
the task that aborted.
User overridable callback.
User overridable callback. Its called every time a task finishes.
You can use this to implement very refined termination strategies.
By default just logs the task
has finished.
{ @see onTaskStart} for a callback when a task starts. { @see onTaskAbort} for a callback when a task aborts.
User overridable callback.
User overridable callback. Its called every time a task starts.
By default just logs the task
as started.
{ @see onTaskFinish} for a callback when a task finishes. { @see onTaskAbort} for a callback when a task aborts.
This exists to make the creation of FullTasks easier.
This exists to make the creation of FullTasks easier.
the settings to use for this orchestrator.
the settings to use for this orchestrator.
Tolerance = how many votes the quorum can afford to not obtain/lose (due to an aborted task) such that its not necessary to terminate the quorum.
Tolerance = how many votes the quorum can afford to not obtain/lose (due to an aborted task) such that its not necessary to terminate the quorum. For example: if the quorum has 5 tasks and minimumVotes = Majority = 3 then at most 2 tasks can abort/not answer if 3 tasks abort then we need to abort the orchestrator.