Метод resyncApplyRules

public static

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

public static function resyncApplyRules(int $templateId): void

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

Описание

Rebuilds the trigger rows of a stored template without touching its sections and schedules. APPLY_RULES is a derived column written only on template add and update, so a fixed activity class does not repair the rules already stored on a portal. onTemplateUpdate() cannot be reused for that: it also rewrites the sections and resyncs the schedules - an extra write and a risk for the schedule agents. Orphan rows are left in place on purpose: a template that fails to parse must not lose them. An inactive template is skipped: syncByTemplate() stores no trigger rows for such a template, so a write here would return its triggers to the start selections. The rows are not deleted either - that write belongs to the template update path, not to a repair of the rules. Every trigger node of the template is rebuilt, not only the rows a caller selected the template by: the rules always come from the whole template body.

Параметры

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

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

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

Путь к исходному файлу Source
~/bitrix/modulesbizproc/lib/workflow/template/entity/workflowtemplatetrigger.php
Расположение метода в файле
Строки 133–156

Исходный код

PHP