Метод resolveSystemTemplate
Сигнатура метода
private function resolveSystemTemplate(string $systemCode): Result
Возвращает:
Result
Описание
Mirrors the criterion of the canonical copy source of BizProc (AiAgentRepository::findCopyableAiAgentTemplate, the resolver of the grid action): a template of the AI-agent kind (TYPE = Nodes) from the AI_AGENT section that is not a launched copy itself (ACTIVATED_AT IS NULL). A row outside that criterion is a workflow of another kind, and a copy of it would run as an agent of the call assessment while assessing nothing. Two conditions are added on top of the canonical criterion, and both refuse the row instead of copying it: - IS_MODIFIED = 'N'. The synchronization never overwrites a template edited by hand (NodesInstallerService::installFromDir), so such a graph is no longer the one of the delivered package, while the copy of it would be started on behalf of RESTORE_USER_ID; - a single trusted template. SYSTEM_CODE carries no unique index, and the comparison of the column is case insensitive, so a duplicate or a differently cased code would make the choice of the source arbitrary. The identity of the code is therefore verified in PHP, not by the column comparison alone. Both conditions are decided over templates, not over rows of the select: the section join multiplies the row of a template carrying more than one AI_AGENT section row, which the unique key of the section table (TEMPLATE_ID, SECTION_ID, PATH) allows while PATH is null. Counting rows would refuse a valid blueprint, and a limited select would let an untrusted row take a slot and hide a trusted duplicate behind it.
Параметры
1| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$systemCode
|
string
|
—
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulescrm/lib/integration/bizproc/callassessmentaiagent.php