The behavior of this task.
The behavior of this task. This is akin to the receive method of an actor, except for the fact that an all catching pattern match will cause the orchestrator to fail. For example:
def behavior = Receive { case m if matchDeliveryId(m) => //Some code }
Will cause the orchestrator to fail.
The constructor of the message to be sent.
The ActorPath to whom this task will send the message(s).
whether this task status is Unstarted and all its dependencies have finished.
the current expected deliveryId of this Task.
Signals that this task has finished.
Signals that this task has finished.
the received message that signaled this task has finished.
whether this task status is Finished
.
whether this task status is Waiting
.
the deliveryId obtained from the received message.
true if the deliveryId of receivedMessage
is the same as the one this task is expecting. False otherwise.
Starts the execution of this task.
Starts the execution of this task. If this task is already Waiting or Finished an error will be logged.
We first persist that the message was sent, then we send it. If the Orchestrator is recovering then we just send the message because there is no need to persist that the message was sent.
the current status of this Task.
The TaskStatus representation of this task.
A task corresponds to sending a message to an actor, handling its response and possibly mutate the internal state of the Orchestrator. The answer(s) to the sent message must be handled in
behavior
.behavior
must invokefinish
when no further processing is necessary. The pattern matching insidebehavior
should invokematchSenderAndID
to ensure the received message is in fact the one that we were waiting to receive. The internal state of the orchestrator might be mutated insidebehavior
.This class is super tightly coupled with Orchestrator and the reverse is also true.
This class changes the internal state of the orchestrator:
tasks
variable.behavior
the internal state of the orchestrator may be changed.In exchange the orchestrator changes the internal state of the task:
start
which changes the task status to Waiting.