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

		if ($debugSession->isBeforeDebuggerStartState())
		{
			return;
		}

		$debugSession->addWorkflowContext($preGeneratedWorkflowId, []);

		$status = $this->getTarget()->getDocumentStatus();
		$documentType = $this->getTarget()->getDocumentType()[2];
		$documentId = $this->getTarget()->getDocumentId();
		if (!$this->isStarted($documentType, $documentId, $status))
		{
			$this->onDocumentStatusChangedDebug($preGeneratedWorkflowId, $status);
		}
	}

	$this->runDocumentStatus($preGeneratedWorkflowId);
}