public function run($workload, TaskWrapper $task)
    {
        $result = false;
        $this->id = $task->getId();
        $this->name = $task->getName();

        try {
            if (false !== $this->beforeRun($workload, $task)) {
                $result = $this->doRun($workload, $task);

                $this->afterRun($result);
            }
        } catch (\Exception $e) {
            $this->onException($e);
        }

        return $result;
    }