CBPRestActivity::Unsubscribe: Bitrix method

      
<?php 
//  CBPRestActivity :: Unsubscribe()
//  /dist/bitrix/modules/bizproc/classes/general/restactivity.php:235

    
public function Unsubscribe(IBPActivityExternalEventListener $eventHandler)
    {
        if (
$eventHandler == null)
            throw new 
Exception('eventHandler');

        
$timeoutDuration $this->CalculateTimeoutDuration();
        if (
$timeoutDuration 0)
        {
            
$schedulerService $this->workflow->GetService("SchedulerService");
            
$schedulerService->UnSubscribeOnTime($this->subscriptionId);
            
$this->subscriptionId 0;
        }

        
$this->eventId null;
        
$this->workflow->RemoveEventHandler($this->name$eventHandler);
    }