CBPSchedulerService :: OnAgent: Bitrix method

      
<?php 
//  CBPSchedulerService :: OnAgent()
//  /dist/bitrix/modules/bizproc/classes/general/schedulerservice.php:92

    
public static function OnAgent($workflowId$eventName$eventParameters = array())
    {
        try
        {
            
CBPRuntime::SendExternalEvent($workflowId$eventName$eventParameters);
        }
        catch (
Exception $e)
        {
            if (
$e->getCode() === \CBPRuntime::EXCEPTION_CODE_INSTANCE_LOCKED)
            {
                
$counter = isset($eventParameters['Counter']) ? (int) $eventParameters['Counter'] : 0;
                
$expiresAt self::getExpiresTimeByCounter($counter);
                if (
$expiresAt)
                {
                    ++
$counter;
                    
self::addAgent($workflowId$eventName$expiresAt$counter);
                }
            }
        }
    }