Runtime :: stopTemplates: Bitrix method

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

    
protected function stopTemplates()
    {
        
$errors = [];
        
$instanceIds $this->getWorkflowInstanceIds();
        
$documentType $this->getTarget()->getDocumentType();
        
$documentId = [$documentType[0], $documentType[1], $this->getTarget()->getDocumentId()];
        foreach (
$instanceIds as $instanceId)
        {
            \
CBPDocument::terminateWorkflow(
                
$instanceId,
                
$documentId,
                
$errors,
                
Loc::getMessage('BIZPROC_AUTOMATION_TEMPLATE_TERMINATED')
            );
        }
    }