Метод registerWorkflowCreation

public

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

public function registerWorkflowCreation(int $templateId, string $workflowId, array &$parameters): Result

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

Описание

Barrier of a starting workflow, called by the OnCreateWorkflow handler before CBPWorkflow::initialize() and CBPStateService::addWorkflow(), so the future workflow id is owned before its state exists. The one time marker of the operation is taken out of the start parameters and consumed here, hence it never reaches the initialized workflow and cannot authorize a second start. A refusal has to abort the creation of the workflow. The marker is taken out only after the template is confirmed to be a managed one. The event hands the parameters over after the declared defaults have been substituted and the very same array goes on to CBPWorkflow::initialize(), so an unconditional removal would take a value of that name away from a foreign workflow. The classification of the template is memoized, therefore asking for it here costs the barrier no additional query.

Параметры

3
Имя Тип По умолчанию Флаги
$templateId int —
—
$workflowId string —
—
$parameters array —
by-ref

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

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

Путь к исходному файлу Source
~/bitrix/modulesbizproc/lib/Internal/AiAgent/Lifecycle/Service/ManagedAgentResourceRegistry.php
Расположение метода в файле
Строки 358–374

Исходный код

PHP