use of org.apache.synapse.mediators.template.InvokeMediator in project wso2-synapse by wso2.
the class TemplateMessageExecutor method init.
public void init(SynapseEnvironment se) {
// Initialize the template and populate the parameters
synapseEnvironment = se;
invoker = new InvokeMediator();
invoker.setTargetTemplate(templateKey);
buildParameters(templateParams);
// Remove if there's a sequence already exists
if (se.getSynapseConfiguration().getSequence(SynapseConstants.PREFIX_HIDDEN_SEQUENCE_KEY + templateKey.hashCode()) != null) {
se.getSynapseConfiguration().removeSequence(SynapseConstants.PREFIX_HIDDEN_SEQUENCE_KEY + templateKey.hashCode());
}
seqMed = new SequenceMediator();
seqMed.setName(SynapseConstants.PREFIX_HIDDEN_SEQUENCE_KEY + templateKey.hashCode());
seqMed.addChild(invoker);
se.getSynapseConfiguration().addSequence(seqMed.getName(), seqMed);
}
Aggregations