CBPDocument::onDocumentDelete

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPDocument
  4. onDocumentDelete
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/document.php
  • Класс: CBPDocument
  • Вызов: CBPDocument::onDocumentDelete
static function onDocumentDelete($documentId, &$errors)
{
	$errors = [];

	$instanceIds = BizprocWorkflowEntityWorkflowInstanceTable::getIdsByDocument($documentId);
	foreach ($instanceIds as $instanceId)
	{
		static::TerminateWorkflow($instanceId, $documentId, $errors);
	}

	$debugSession = BizprocDebuggerSessionManager::getActiveSession();
	if ($debugSession && $debugSession->isFixedDocument($documentId))
	{
		BizprocDebuggerListener::getInstance()->onDocumentDeleted();
	}

	//Deferred deletion
	BizprocWorkerDocumentDeleteStepper::bindDocument($documentId);

	//touch runtime
	CBPRuntime::getRuntime()->onDocumentDelete($documentId);
}

Добавить комментарий