CBPDocument :: GetUserTasksForWorkflow: Bitrix method

      
<?php 
//  CBPDocument :: GetUserTasksForWorkflow()
//  /dist/bitrix/modules/bizproc/classes/general/document.php:1373

    
public static function GetUserTasksForWorkflow($userId$workflowId)
    {
        
$userId intval($userId);
        if (
$userId <= 0)
            return array();

        
$workflowId trim($workflowId);
        if (
strlen($workflowId) <= 0)
            return array();

        
$arResult = array();

        
$dbTask CBPTaskService::GetList(
            array(),
            array(
"WORKFLOW_ID" => $workflowId"USER_ID" => $userId'STATUS' => CBPTaskStatus::Running),
            
false,
            
false,
            array(
"ID""WORKFLOW_ID""NAME""DESCRIPTION")
        );
        while (
$arTask $dbTask->GetNext())
            
$arResult[] = $arTask;

        return 
$arResult;
    }