public function completionAction()
    {

        $job = $this->initializeJob()->get($this->params(), false, true);

        if ($job->isDraft()) {

            $job->setIsDraft(false);

            $reference = $job->getReference();

            if (empty($reference)) {
                /* @var $repository \Jobs\Repository\Job */
                $repository = $this->repositoryService->get('Jobs/Job');
                $job->setReference($repository->getUniqueReference());
            }
            $job->changeStatus(Status::CREATED, "job was created");
            $job->setAtsEnabled(true);

            // sets ATS-Mode on intern
            $job->getAtsMode();

            /*
            * make the job opening persist and fire the EVENT_JOB_CREATED
            */
            $this->repositoryService->store($job);

            $jobEvents = $this->jobEvents;
            $jobEvents->trigger(JobEvent::EVENT_JOB_CREATED, $this, array('job' => $job));
        } else if ($job->isActive()) {
            $eventParams = [
                'job' => $job,
                'statusWas' => $job->getStatus()->getName(),
            ];
            $job->getOriginalEntity()->changeStatus(Status::WAITING_FOR_APPROVAL, 'job was edited.');
            $this->jobEvents->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, $eventParams);
        }

        /* @var \Auth\Controller\Plugin\UserSwitcher $switcher */
        $switcher = $this->plugin('Auth/User/Switcher');
        if ($switcher->isSwitchedUser()) {
            $return = $switcher->getSessionParam('return');
            $switcher->clear();

            if ($return) {
                return $this->redirect()->toUrl($return);
            }
        }

        return array('job' => $job);
    }