deprecationWarning.warn();
this.validateParams(params);
final MessageContext ctx = context.getVariable("message");
final String xpathExpression = this.getXpathExpression(params);
final boolean hasCustomPayload = this.hasCustomPayload(params);
MuleMessage muleMessage = context.getVariable(MVELExpressionLanguageContext.MULE_MESSAGE_INTERNAL_VARIABLE);
if (hasCustomPayload)
{
muleMessage = new DefaultMuleMessage(params[1], muleContext);
}
else if (muleMessage == null)
{
muleMessage = new DefaultMuleMessage(ctx.getPayload(), muleContext);
}
String evaluator = hasCustomPayload ? NODE_EVALUATOR : BRANCH_EVALUATOR;
try
{
Object result = muleContext.getExpressionManager().evaluate(evaluator + xpathExpression, muleMessage);
if (!hasCustomPayload)
{
ctx.setPayload(muleMessage.getPayload());
}
return result;
}
catch (Exception e)