/** * Calls the handler to process the values collected by the ui before. * * @throws class_exception * @return string * @permissions view */ protected function actionSaveUi() { $strReturn = ""; $objWorkflow = new class_module_workflows_workflow($this->getSystemid()); $arrIdsToCheck = array_merge(array($this->objSession->getUserID()), $this->objSession->getGroupIdsAsArray()); $arrIdsOfTask = explode(",", $objWorkflow->getStrResponsible()); //ui given? current user responsible? //magic: the difference of the tasks' ids and the users' ids should be less than the count of the task-ids - then at least one id matches if ($objWorkflow->getObjWorkflowHandler()->providesUserInterface() && ($objWorkflow->getStrResponsible() == "" || count(array_diff($arrIdsOfTask, $arrIdsToCheck)) < count($arrIdsOfTask))) { $objHandler = $objWorkflow->getObjWorkflowHandler(); $objHandler->processUserInput($this->getAllParams()); if ($objWorkflow->getBitSaved() == true) { throw new class_exception("Illegal state detected! Workflow was already saved before!", class_exception::$level_FATALERROR); } $objWorkflow->updateObjectToDb(); $this->adminReload(class_link::getLinkAdminHref($this->getArrModule("modul"), "myList")); } else { $strReturn .= $this->getLang("commons_error_permissions"); } return $strReturn; }