• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/automation/engine/runtime.php
  • Класс: Bitrix\Crm\Automation\Engine\Runtime
  • Вызов: Runtime::stopTemplates
protected function stopTemplates()
{
	if (!Automation\Helper::isBizprocEnabled())
		return;

	$errors = array();
	$documentId = $this->getBizprocDocumentId();
	$instanceIds = $this->getBizprocInstanceIds($documentId);
	foreach ($instanceIds as $instanceId)
	{
		\CBPDocument::TerminateWorkflow(
			$instanceId,
			$documentId,
			$errors,
			Loc::getMessage('CRM_AUTOMATION_TEMPLATE_TERMINATED_MSGVER_1')
		);
	}
}