I am currently developping an ESB (3.7.0 CE) mule application and I am using Poll component with fixed-frequency-scheduler. I would like to externalize timeUnit scheduler's attribute as below:
<poll doc:name="Poll">
<fixed-frequency-scheduler frequency="${scheduler.frequency}" timeUnit="${scheduler.timeUnit}" startDelay="${scheduler.startDelay}" />
<http:request config-ref="HTTP_RSS_Request_Configuration" path="${dmp.url.token}" method="GET" doc:name="HTTP GET RSS"/>
</poll>
However, an exception is thrown during deployment:
2016-11-25 10:13:29,265 [Mule.app.deployer.monitor.1.thread.1] ERROR org.mule.module.launcher.application.DefaultMuleApplication - null
org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${scheduler.timeUnit}' is not a valid value for 'NMTOKEN'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[?:?]
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) ~[?:?]
The explanation might be that NMTOKEN does not allow using of $, {, } which are required for defining properties. But the question is how this could be overcome.