RestService :: writeActivityLog: Bitrix method

      
<?php 
//  Bitrix\Bizproc\RestService :: writeActivityLog()
//  /dist/bitrix/modules/bizproc/lib/restservice.php:473

    
public static function writeActivityLog($params$n$server)
    {
        
$params array_change_key_case($paramsCASE_UPPER);
        list(
$workflowId$activityName$eventId) = self::extractEventToken($params['EVENT_TOKEN']);

        
$logMessage = isset($params['LOG_MESSAGE']) ? $params['LOG_MESSAGE'] : '';

        if (empty(
$logMessage))
            throw new 
RestException('Empty log message!'self::ERROR_EMPTY_LOG_MESSAGE);

        \
CBPRuntime::sendExternalEvent(
            
$workflowId,
            
$activityName,
            array(
                
'EVENT_ID' => $eventId,
                
'LOG_ACTION' => true,
                
'LOG_MESSAGE' => $logMessage
            
)
        );

        return 
true;
    }