CBPDocument::getUserTasksForWorkflow

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPDocument
  4. getUserTasksForWorkflow
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/document.php
  • Класс: CBPDocument
  • Вызов: CBPDocument::getUserTasksForWorkflow
static function getUserTasksForWorkflow($userId, $workflowId)
{
	$userId = intval($userId);
	if ($userId <= 0)
		return array();

	$workflowId = trim($workflowId);
	if ($workflowId == '')
		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;
}

Добавить комментарий