CBPRuntime :: checkWorkflowRecursion: Bitrix method

      
<?php 
//  CBPRuntime :: checkWorkflowRecursion()
//  /dist/bitrix/modules/bizproc/classes/general/runtime.php:811

    
private function checkWorkflowRecursion($workflowId$currentTemplateId)
    {
        
$templates = array($currentTemplateId);
        while (isset(
$this->workflowChains[$workflowId]))
        {
            
$parent $this->workflowChains[$workflowId];
            if (
in_array($parent['templateId'], $templates))
                return 
true;
            
$templates[] = $parent['templateId'];
            
$workflowId $parent['workflowId'];
        }
        return 
false;
    }