CBPSchedulerService::sendEventToWorkflow: Bitrix method

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

    
private static function sendEventToWorkflow($event$counter 0)
    {
        try
        {
            
CBPRuntime::SendExternalEvent($event['WORKFLOW_ID'], $event['HANDLER'], $event['EVENT_PARAMETERS']);
        }
        catch (
Exception $e)
        {
            if (
$e->getCode() === \CBPRuntime::EXCEPTION_CODE_INSTANCE_NOT_FOUND)
            {
                
SchedulerEventTable::delete($event['ID']);
            }
            elseif (
$e->getCode() === \CBPRuntime::EXCEPTION_CODE_INSTANCE_LOCKED)
            {
                
self::addEventRepeatAgent($event$counter);
            }
        }
    }