public function cancelExecution()
    {

        $deliveryExecution = $this->getCurrentDeliveryExecution();
        /** @var DeliveryExecutionStateService $deliveryExecutionStateService */
        $deliveryExecutionStateService = $this->getServiceManager()->get(DeliveryExecutionStateService::SERVICE_ID);
        $reason = [
            'reasons' => ['category' => 'Examinee', 'subCategory' => 'Navigation'],
        ];
        if ($deliveryExecution->getState()->getUri() === DeliveryExecutionState::STATE_AUTHORIZED) {
            $reason['comment'] = __('Automatically reset by the system due to the test taker choosing not to proceed with the authorized test.');
        } else {
            $reason['comment'] = __('Automatically reset by the system due to authorization request being cancelled by test taker.');
        }
        $deliveryExecutionStateService->cancelExecution(
            $deliveryExecution,
            $reason
        );
        return $this->redirect($this->getReturnUrl());
    }