• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/taskservice.php
  • Класс: CBPTaskService
  • Вызов: CBPTaskService::getWorkflowParticipants
static function getWorkflowParticipants($workflowId, $userStatus = null)
{
	global $DB;

	if ($workflowId == '')
		throw new Exception('workflowId');

	$users = array();
	$iterator = $DB->Query('SELECT DISTINCT TU.USER_ID'
		.' FROM b_bp_task_user TU'
		.' INNER JOIN b_bp_task T ON (T.ID = TU.TASK_ID)'
		.' WHERE T.WORKFLOW_ID = ''.$DB->ForSql($workflowId).'''
		.($userStatus !== null ? ' AND TU.STATUS = '.(int)$userStatus : '')
	);
	while ($user = $iterator->fetch())
	{
		$users[] = (int)$user['USER_ID'];
	}
	return $users;
}