77        $this->userId = $user_id;
 
   91        $this->percentages[spl_object_hash($task)] = 
$percentage;
 
   92        $this->calculateOverallPercentage();
 
  109        $this->currentTask = $task;
 
  121        $this->totalNumberOfTasks = count($this->tasks);
 
  122        $this->rootTask = $task;
 
  123        foreach ($this->tasks as $subTask) {
 
  124            $this->percentages[spl_object_hash($subTask)] = 0;
 
  134    public function calculateOverallPercentage()
 
  136        $countable_tasks = 0;
 
  140        foreach ($this->tasks as $task) {
 
  142                case ($task instanceof 
Task\
Job):
 
  148        $this->percentage = array_sum($this->percentages) / $countable_tasks;
 
  202            foreach ($this->
getTask()->unfoldTask() as $task) {
 
  204                    throw new Exception(
"Your task contains user interactions and thus needs a user that observes the task.");
 
  226            throw new Exception(
"Cannot continue a task that is not in the state 'user interaction'");
 
  230            throw new Exception(
"Observer is in an invalid state! state: userInteraction but current task is not a user interaction!");
 
  235        $resulting_value = 
$currentTask->interaction($inputs, $option, $this);
 
  258        foreach (
$tasks as $task) {
 
  260            foreach ($task->getInput() as 
$input) {
 
  262                    $newInputs[] = $resulting_value;
 
  267            $task->setInput($newInputs);
 
  315        $now = new \DateTime(
'now', 
new \DateTimeZone(
'UTC'));
 
  316        $this->lastHeartbeat = $now->getTimestamp();
 
foreach($mandatory_scripts as $file) $timestamp
An exception for terminatinating execution or to throw for unit testing.
setDescription($description)
setLastHeartbeat($timestamp)
heartbeat()
There was something going on in the bucket, it's still working.
getLastHeartbeat()
When was the last time that something happened on this bucket?
setOverallPercentage($percentage)
setPercentage(Task $task, $percentage)
Used by a job to notify his percentage.
replaceThunkValue(Task $currentTask, Value $resulting_value)
In the structure of the task of this bucket the result of $currentTask is replaced with the $resultin...
userInteraction(Option $option)
Continue a task with a given option.