public TemplateInstanceExecution templateInstanceExecution(String sourceName, ExpressionEngine expressionEngine) {
        // Transforms each parameter in a name/value pair, using only the source name as input
        Map<String, String> sourceNameInput = Collections.singletonMap("sourceName", sourceName);
        Map<String, String> parameterMap = Maps.transformValues(
                Maps.uniqueIndex(
                        parameters,
                        TemplateParameter::getName
                ),
                parameter -> expressionEngine.render(parameter.getExpression(), sourceNameInput)
        );
        // Concatenates the maps
        Map<String, String> inputMap = new HashMap<>(sourceNameInput);
        inputMap.putAll(parameterMap);
        // Resolves the final expression
        return new TemplateInstanceExecution(
                value -> expressionEngine.render(value, inputMap),
                parameterMap
        );
    }
public TemplateInstanceExecution templateInstanceExecution ( String sourceName , ExpressionEngine expressionEngine ) { Map < String , String > sourceNameInput = Collections . singletonMap ( "sourceName" , sourceName ) ; Map < String , String > parameterMap = Maps . transformValues ( Maps . uniqueIndex ( parameters , TemplateParameter :: getName ) , parameter -> expressionEngine . render ( parameter . getExpression ( ) , sourceNameInput ) ) ; Map < String , String > inputMap = new HashMap < > ( sourceNameInput ) ; inputMap . putAll ( parameterMap ) ; return new TemplateInstanceExecution ( value -> expressionEngine . render ( value , inputMap ) , parameterMap ) ; }
Gets the execution context for the creation of a template instance.

@param sourceName       Input for the expression
@param expressionEngine Expression engine to use
@return Transformed string