Skip to content

Commit

Permalink
Merge pull request #2272 from chathuranga-jayanath-99/add-synapse-exp…
Browse files Browse the repository at this point in the history
…ression-for-templates

Add synapse expression support for templates
  • Loading branch information
SanojPunchihewa authored Jan 10, 2025
2 parents 7b7e8c2 + c9afb4f commit db94c28
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.synapse.mediators.eip.EIPUtils;
import org.apache.synapse.transport.util.MessageHandlerProvider;
import org.apache.synapse.transport.passthru.PassThroughConstants;
import org.apache.synapse.util.xpath.SynapseExpression;
import org.apache.synapse.util.xpath.SynapseJsonPath;

import javax.xml.stream.XMLStreamException;
Expand Down Expand Up @@ -147,7 +148,8 @@ private Object getEvaluatedParamValue(MessageContext synCtx, String parameter, V
MessageHandlerProvider.getMessageHandler(axis2MsgCtx).buildMessage(axis2MsgCtx);
}

if (expression.getExpression() instanceof SynapseJsonPath) {
if (expression.getExpression() instanceof SynapseJsonPath ||
expression.getExpression() instanceof SynapseExpression) {
return expression.evaluateValue(synCtx);
} else {
return resolveExpressionValue(synCtx, expression);
Expand Down

0 comments on commit db94c28

Please sign in to comment.