}
catch (Exception e)
{
//continue - test will fail.
}
context.declareFunction("f", new ExpressionLanguageFunction()
{
@Override
public Object call(Object[] params, ExpressionLanguageContext context)
{
return "called param[0]=" + params[0] + ",param[1]=" + params[1] + ",app.name="
+ ((AppContext) context.getVariable("app")).getName();
}
});
context.declareFunction("muleContext", new ExpressionLanguageFunction()
{
@Override
public Object call(Object[] params, ExpressionLanguageContext context)
{
return context.getVariable(MVELExpressionLanguageContext.MULE_CONTEXT_INTERNAL_VARIABLE);
}
});
context.declareFunction("muleMessage", new ExpressionLanguageFunction()
{
@Override
public Object call(Object[] params, ExpressionLanguageContext context)
{
return context.getVariable(MVELExpressionLanguageContext.MULE_MESSAGE_INTERNAL_VARIABLE);