protected function processActionCompleteWorkflow() { $this->checkRequiredPostParams(array('workflowId', 'iblockTypeId', 'elementId', 'iblockId', 'sectionId', 'socnetGroupId', 'action')); $this->fillDataForCheckPermission(); $this->checkPermission(); if ($this->errorCollection->hasErrors()) { $this->sendJsonErrorResponse(); } $workflowId = $this->request->getPost('workflowId'); $this->elementId = $this->request->getPost('elementId'); $listError = CLists::completeWorkflow($workflowId, $this->iblockTypeId, $this->elementId, $this->iblockId, $this->request->getPost('action')); if (!empty($listError)) { $this->errorCollection->add(array(new Error($listError))); } if ($this->errorCollection->hasErrors()) { $this->sendJsonErrorResponse(); } $this->sendJsonSuccessResponse(array('message' => Loc::getMessage('LISTS_MESSAGE_SUCCESS'))); }