CBPAllStateService::GetStateDocumentId: Bitrix method

      
<?php 
//  CBPAllStateService :: GetStateDocumentId()
//  /dist/bitrix/modules/bizproc/classes/general/stateservice.php:79

    
public static function GetStateDocumentId($workflowId)
    {
        global 
$DB;

        
$workflowId trim($workflowId);
        if (
strlen($workflowId) <= 0)
            throw new 
Exception("workflowId");

        
$db $DB->Query("SELECT MODULE_ID, ENTITY, DOCUMENT_ID FROM b_bp_workflow_state WHERE ID = '".$DB->ForSql($workflowId)."' ");
        if (
$ar $db->Fetch())
            return array(
$ar["MODULE_ID"], $ar["ENTITY"], $ar["DOCUMENT_ID"]);

        return 
false;
    }