Runtime :: onDocumentStatusChanged: Bitrix method

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

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

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