public void startSources() {
        if (running) {
            log.warn("Error calling startSources() for Siddhi App '" + siddhiAppContext.getName() + "', " +
                    "SiddhiApp already started with the sources.");
            return;
        }
        if (!runningWithoutSources) {
            throw new SiddhiAppRuntimeException("Cannot call startSources() without calling startWithoutSources() " +
                    "for Siddhi App '" + siddhiAppContext.getName() + "'");
        } else {
            try {
                for (List<Source> sources : sourceMap.values()) {
                    for (Source source : sources) {
                        source.connectWithRetry();
                    }
                }
                running = true;
                runningWithoutSources = false;
            } catch (Throwable t) {
                log.error("Error starting Siddhi App '" + siddhiAppContext.getName() + "', " +
                        "triggering shutdown process. " + t.getMessage());
                try {
                    shutdown();
                } catch (Throwable t1) {
                    log.error("Error shutting down partially started Siddhi App '" + siddhiAppContext.getName() + "', "
                            + t1.getMessage());
                }
            }
        }
    }
This method get the onDemandQuery and return the corresponding output and its types.

@param onDemandQuery       this onDemandQuery is processed and get the output attributes.
@param onDemandQueryString this passed to report errors with context if there are any.
@return List of output attributes
modules/siddhi-core/src/main/java/io/siddhi/core/SiddhiAppRuntimeImpl.java