@Override
    public void send(ComplexEventChunk complexEventChunk, int noOfEvents) {
        if (getSiddhiDebugger() != null) {
            getSiddhiDebugger()
                    .checkBreakPoint(getQueryName(), SiddhiDebugger.QueryTerminal.OUT, complexEventChunk.getFirst());
        }
        if (convertToStreamEvent) {
            ComplexEventChunk<StreamEvent> streamEventChunk = new ComplexEventChunk<StreamEvent>();
            complexEventChunk.reset();
            while (complexEventChunk.hasNext()) {
                ComplexEvent complexEvent = complexEventChunk.next();
                StreamEvent borrowEvent = streamEventFactory.newInstance();
                streamEventConverter.convertData(
                        complexEvent.getTimestamp(),
                        complexEvent.getOutputData(),
                        complexEvent.getType(),
                        borrowEvent);
                streamEventChunk.add(borrowEvent);
            }
            table.addEvents(streamEventChunk, noOfEvents);
        } else {
            table.addEvents((ComplexEventChunk<StreamEvent>) complexEventChunk, noOfEvents);
        }
    }
Implementation of {@link OutputCallback} to receive processed Siddhi events from
Siddhi queries and insert data into a {@link Table}
based on received events and condition.
modules/siddhi-core/src/main/java/io/siddhi/core/query/output/callback/InsertIntoTableCallback.java