private String formatMessage(Object[] outputData) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < splitTemplateArray.length; i++) {
            if (i % 2 == 0) {
                stringBuilder.append(splitTemplateArray[i]);
            } else {
                stringBuilder.append(outputData[positionArray[i / 2]]);
            }
        }
        return stringBuilder.toString();
    }
Template builder used by {@link SinkMapper} to generate custom payload.
modules/siddhi-core/src/main/java/io/siddhi/core/util/transport/TemplateBuilder.java