public function processInput(QtiRunnerServiceContext $context, array $input)
    {
        $responses = [];

        foreach ($input as $data) {
            if (!is_array($data) || !isset($data['channel']) || !isset($data['message'])) {
                throw new \common_exception_InconsistentData('Wrong message chunk received by the bidirectional communication service: either channel or message content is missing!');
            }

            if ($this->hasChannel($data['channel'], self::CHANNEL_TYPE_INPUT)) {
                $channel = $this->getChannel($data['channel'], self::CHANNEL_TYPE_INPUT);
                // known channel, forward...
                $responses[] = $this->processChannel($channel, $context,  $data['message']);
            } else {
                // unknown channel, fallback!
                $responses[] = $this->fallback($data['channel'], $context, $data['message']);
            }
        }

        return $responses;
    }