Метод checkExistingRunsAction
Сигнатура метода
public function checkExistingRunsAction(int $templateId): array
Возвращает:
array
Описание
Pre-flight check before copying and starting a system AI-agent template (API-01). Answers whether the user should be warned that agents from this template are already running, and - in that case only - spends the personal right to see that warning. The right is spent atomically inside this call, so a repeated call by the same user answers showWarning: false. The action must not be replayed "just in case". The template first has to pass the launchable predicate (PRED-01): without it the method would answer "are there running agents" for an arbitrary id and would reveal the system code of a hidden template. Every rejection reason is reported as the same accessDenied error. The system code comes from the predicate's own result - the weaker getSystemAiAgentCode() is deliberately not used here. A user-created template from the designer has no system code: the warning gate is skipped and the answer is showWarning: false, systemCode: null. Tariff unavailability is not inherited by this controller family; it is expressed as showWarning: false by the policy. The regional gate is inherited from BaseController.
Параметры
1| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$templateId
|
int
|
—
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulesbizproc/lib/Infrastructure/Controller/Integration/AiAgent/Template.php