Aborts this task, which implies:
Aborts this task, which implies:
Aborted
.
2. Every unstarted task that depends on this one will never be started. This will happen because a task can
only start if its dependencies have finished.
3. Waiting tasks or tasks which do not have this task as a dependency will remain untouched,
unless the orchestrator is stopped or context.become
is invoked in the onTaskAbort
/onAbort
callbacks of the orchestrator.
4. The method onTaskAbort
will be invoked in the orchestrator.
5. The method onFinish
in the orchestrator will never be invoked since this task did not finish.Aborting an already aborted task will throw an exception.
what caused the abort to be invoked.
The behavior of this task.
The behavior of this task. This is akin to the receive method of an actor with the following exceptions:
· An all catching pattern match is prohibited since it will cause the orchestrator to fail.
· Every case must check if matchId
returns true.
This ensures the received message was in fact destined to this task.
This choice of implementation allows the messages to have a free form, as it is the user that
is responsible for extracting the id
from the message.
· Either finish
or abort
must be invoked after handling each response.
Example of a well formed behavior:
case Success(result, id) if matchId(id) => orchestrator.state = // a new state finish("This task result") // The result is the value that the tasks that depend on this one will see. case SomethingWentWrong(why, id) if matchId(id) => abort(why) case Timeout(id) => abort(anError)
The constructor of the message to be sent.
The constructor of the message to be sent. It must always return the same message, only the id must be different.
If this Task is to be used inside a TaskQuorum then the created message should also implement equals
.
The akka.actor.ActorPath to whom this task will send the message(s).
The akka.actor.ActorPath to whom this task will send the message(s). This must be a value because the destination cannot change.
Finishes this task, which implies:
Finishes this task, which implies:
Finished
.
2. Tasks that depend on this one will be started.
3. Re-sends from destination
will no longer be handled by the orchestrator.
If destinations re-sends its answer it will be logged as an unhandled message.
4. The method onTaskFinish
will be invoked on the orchestrator.Finishing an already finished task will throw an exception.
the result this task will produce. This is the value that the tasks that depend on this one will see.
In order for this task to work correctly either: · The created orchestrator must send to its parent a Orchestrator.Success when it finishes and a Orchestrator.Failure when it aborts. And terminate afterwords of sending the messages. · Or the method behavior must be overridden to handle the messages the inner orchestrator sends when it terminates or aborts.
the return type of this Task. Also the return type of the spawned orchestrator.
the type of AbstractOrchestrator the Props must create.