• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/runtime.php
  • Класс: BitrixBizprocAutomationEngineRuntime
  • Вызов: Runtime::runDocumentStatus
public function runDocumentStatus(string $preGeneratedWorkflowId = null): ?string
{
	$status = $this->getTarget()->getDocumentStatus();
	$documentType = $this->getTarget()->getDocumentType()[2];
	$documentId = $this->getTarget()->getDocumentId();

	if ($status && !$this->isStarted($documentType, $documentId, $status))
	{
		$this->stopTemplates();

		return $this->runTemplates($status, $preGeneratedWorkflowId);
	}

	return null;
}