models/classes/runner/ExtendedState.php
public function addEvent($eventName, $data = null)
    {
        $eventId = uniqid('event', true);
        $this->state[self::VAR_EVENTS_QUEUE][$eventId] = [
            'id' => $eventId,
            'timestamp' => microtime(true),
            'user' => \common_session_SessionManager::getSession()->getUserUri(),
            'type' => $eventName,
            'data' => $data,
        ];
        return $eventId;
    }
public function addEvent($eventName, $data = null)
    {
        $eventId = uniqid('event', true);
        $this->state[self::VAR_EVENTS_QUEUE][$eventId] = [
            'id' => $eventId,
            'timestamp' => microtime(true),
            'user' => \common_session_SessionManager::getSession()->getUserUri(),
            'type' => $eventName,
            'data' => $data,
        ];
        return $eventId;
    }
Add an event on top of the queue
@param string $eventName
@param mixed $data
@return string
@throws \common_Exception