@Override
    protected Object execute(Object[] data, State state) {
        // check whether first argument true or null
        if (Boolean.TRUE.equals(data[0])) {
            return data[1];
        } else {
            return data[2];
        }
    }
Executor class for ifThenElse function. Function execution logic is implemented in execute here.
modules/siddhi-core/src/main/java/io/siddhi/core/executor/function/IfThenElseFunctionExecutor.java