Runtime::getWorkflowInstanceIds: Bitrix method

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

    
protected function getWorkflowInstanceIds()
    {
        
$documentType $this->getTarget()->getDocumentType();
        
$documentId $this->getTarget()->getDocumentId();
        
$ids WorkflowInstanceTable::getList(array(
            
'select' => array('ID'),
            
'filter' => array(
                
'=MODULE_ID'             => $documentType[0],
                
'=ENTITY'                => $documentType[1],
                
'=DOCUMENT_ID'           => $documentId,
                
'=STARTED_EVENT_TYPE' => \CBPDocumentEventType::Automation,
                
'=TEMPLATE.DOCUMENT_TYPE' => $documentType[2],
            )
        ))->
fetchAll();

        return 
array_column($ids'ID');
    }