CBPAllStateService::getWorkflowByIntegerId: Bitrix method

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

    
public static function getWorkflowByIntegerId($integerId)
    {
        global 
$DB;

        
$integerId intval($integerId);
        if (
$integerId <= 0)
            throw new 
Exception("integerId");

        
$dbResult $DB->Query(
            
"SELECT WORKFLOW_ID FROM b_bp_workflow_state_identify WHERE ID = ".$integerId." "
        
);

        
$result $dbResult->fetch();
        if (
$result)
        {
            return 
$result['WORKFLOW_ID'];
        }
        return 
false;
    }