Runtime :: onDocumentAdd: Bitrix method

      
<?php 
//  Bitrix\Bizproc\Automation\Engine\Runtime :: onDocumentAdd()
//  /dist/bitrix/modules/bizproc/lib/automation/engine/runtime.php:137

    
public function onDocumentAdd()
    {
        
$status $this->getTarget()->getDocumentStatus();
        
$documentType $this->getTarget()->getDocumentType()[2];
        
$documentId $this->getTarget()->getDocumentId();

        if (
$status && !$this->isStarted($documentType$documentId$status))
        {
            
$this->runTemplates($status);
        }
    }