public function getReportByLinkedResource(\core_kernel_classes_Resource $resource)
    {
        $taskResource = $this->getTaskResource($resource);

        if ($taskResource !== null) {
            $report = $taskResource->getOnePropertyValue($this->getProperty(Task::PROPERTY_REPORT));

            if ($report) {
                $report = Report::jsonUnserialize($report->literal);
            } else {
                $status = $this->getTaskLog()->getStatus($taskResource->getUri());
                $msg = __('Task is in \'%s\' state', $status);

                $report = $status == TaskLogInterface::STATUS_FAILED
                    ? Report::createFailure($msg)
                    : Report::createInfo($msg);
            }
        } else {
            $report = Report::createFailure(__('Resource is not the task placeholder'));
        }

        return $report;
    }