• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/restservice.php
  • Класс: BitrixBizprocRestService
  • Вызов: RestService::killWorkflow
static function killWorkflow($params, $n, $server)
{
	self::checkAdminPermissions();
	$params = array_change_key_case($params, CASE_UPPER);

	if (empty($params['ID']))
	{
		throw new RestException('Empty workflow instance ID', self::ERROR_WRONG_WORKFLOW_ID);
	}

	$id = $params['ID'];
	$errors = CBPDocument::killWorkflow($id);

	if ($errors)
	{
		throw new RestException($errors[0]['message']);
	}

	return true;
}