62 $replace_thunk_values =
false;
63 foreach ($values as $value) {
65 $value = $this->
executeTask($value->getParentTask(), $observer);
66 $replace_thunk_values =
true;
68 $final_values[] = $value;
71 if ($replace_thunk_values) {
75 if ($task instanceof
Job) {
79 $value = $job->run($final_values, $observer);
80 if (!$value->getType()->isExtensionOf($job->getOutputType())) {
81 throw new Exception(
"The job " . $job->getType()
82 .
" did state to output a value of type " 83 . $job->getOutputType() .
" but outputted a value of type " 93 $user_interaction = $task;
95 if ($user_interaction->canBeSkipped($final_values)) {
96 if ($task->isFinal()) {
99 return $task->getSkippedValue($task->
getInput());
107 throw new Exception(
"You need to execute a Job or a UserInteraction.");
120 $this->persistence->deleteBucket($bucket);
129 $this->persistence->deleteBucket($bucket);
continueTask(Bucket $bucket, Option $option)
Continue a task with a given option.
executeTask(Task $task, Observer $observer)
Actually executes a task.
quitBucket(Bucket $bucket)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
notifyState(int $state)
If the bucket goes into another state notify the observer.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
notifyPercentage(Task $task, int $percentage)
You can change the progress of a currently running task.
__construct(protected Persistence $persistence)
userInteraction(Option $option)
Let the user interact with the bucket task queue.
notifyCurrentTask(Task $task)
If the current task changes notify the observer.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
run(Bucket $bucket)
Depending on your background task settings, executes or puts the task into the queue.