Метод startAction

public

Сигнатура метода

public function startAction(int $templateId): array

Возвращает: array

Описание

Restart action (API-01). Branch selection and the server-side EVENT-01 payload live in SystemTemplateActivationService; here only the guards and the API-01 response shape are assembled. The request carries the template id only — restartRunId/previousRunId/initiatorId/ timestamp and the resolved agent instance are all server-side, never from the body (IDOR guard). Check order (server-side only, ALG-01): tariff/region -> owner/admin -> data actuality. - tariff/region unavailable -> restartUnavailable (AiAgentsFeature error); - not owner/admin of an existing launched copy -> accessDenied; - the launched copy no longer exists / is no longer restartable -> templateStale (ERR-002), no start, no silent fallback. On success the branch was already chosen once (restart vs start); a failed restart start is reported and never replayed as a start (AC-022). The response carries setupTemplateData when the run suspended for constant input, plus runType and (for the restart branch) restartRunId.

Параметры

1
Имя Тип По умолчанию Флаги
$templateId int —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulesbizproc/lib/Infrastructure/Controller/Integration/AiAgent/Template.php
Расположение метода в файле
Строки 162–204

Исходный код

PHP