Метод ensureLaunched

public

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

public function ensureLaunched(int $userId): Result

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

Описание

Restores the active launched copy of the agent and is the only place allowed to create one: the launch it calls is not idempotent, so a second call would produce a second active copy. The feature state is checked here rather than by the caller: that keeps the copy from appearing before the data preparation is over, no matter which entry point the call came from. No transaction is opened - the called bizproc scenario is atomic on its own, and mutual exclusion comes from the named lock. The predicate is read under the lock only, even at the cost of taking the lock when the invariant already holds. Read before the lock it may be served by a replica that still shows a copy already removed by the rollback of a failed parallel launch, and the caller would then drop the bootstrap from the schedule with no copy in place.

Параметры

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

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

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

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/integration/bizproc/callassessmentaiagent.php
Расположение метода в файле
Строки 81–144

Исходный код

PHP