use of org.camunda.spin.plugin.script.TestVariableScope in project camunda-bpm-platform by camunda.
the class SpinFunctionMapperTest method executeExpression.
@SuppressWarnings("unchecked")
protected <T> T executeExpression(String expression) {
final TestVariableScope varScope = new TestVariableScope();
final Expression compiledExpression = processEngineConfiguration.getExpressionManager().createExpression(expression);
return (T) processEngineConfiguration.getCommandExecutorTxRequired().execute(new Command<Object>() {
public Object execute(CommandContext commandContext) {
return compiledExpression.getValue(varScope);
}
});
}
Aggregations