Skip to content

Commit

Permalink
add synapse expression support for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
chathuranga-jayanath-99 committed Jan 3, 2025
1 parent 4c5c6c3 commit c9afb4f
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 c9afb4f

Please sign in to comment.