Метод registerWorkflowCreation
Сигнатура метода
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
|
—
|
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulesbizproc/lib/Internal/AiAgent/Lifecycle/Service/ManagedAgentResourceRegistry.php