• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/restactivity.php
  • Класс: CBPRestActivity
  • Вызов: CBPRestActivity::subscribe
public function subscribe(IBPActivityExternalEventListener $eventHandler)
{
	$timeoutDuration = $this->CalculateTimeoutDuration();
	if ($timeoutDuration > 0)
	{
		$schedulerService = $this->workflow->GetService('SchedulerService');
		$this->subscriptionId = $schedulerService->SubscribeOnTime(
			$this->workflow->GetInstanceId(),
			$this->name,
			time() + $timeoutDuration
		);
	}

	$this->workflow->AddEventHandler($this->name, $eventHandler);
}