• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/runtime.php
  • Класс: BitrixBizprocAutomationEngineRuntime
  • Вызов: Runtime::onFieldsChanged
public function onFieldsChanged(array $changes)
{
	if ($this->isDebug() && $changes)
	{
		$debugSession = BizprocDebuggerSessionManager::getActiveSession();
		if ($debugSession->isBeforeDebuggerStartState())
		{
			return;
		}

		$target = $this->getTarget();

		if ($target->getDocumentCategoryCode() && in_array($target->getDocumentCategoryCode(), $changes))
		{
			$session = BizprocDebuggerSessionManager::getActiveSession();
			$sessionWorkflows = $session->getWorkflowContexts()->getWorkflowIdList();
			if (!empty($sessionWorkflows))
			{
				$lastWorkflowId = $sessionWorkflows[array_key_last($sessionWorkflows)];
				$this->writeCategoryTracking($lastWorkflowId);
			}
		}

		BizprocDebuggerListener::getInstance()->onDocumentUpdated($changes);
	}
}