I try to resolve the following problem:
I should insert route descriptions (Enterprise Intergration pattern things) into an xml file according to a selection and configuration the customer does while UI Stage.
The routes could have different properties like e.g. :
route #1:
Code: Select all
<route autoStartup=[ROUTE1_AUTOSTART]>
<description>[ROUTE1_DESC]</description>
<from uri="file://[ROUTE1_SOURCEPATH]?consumer.delay=5000&preMove=.process&move=../.done&moveFailed=../.error"/>
<to uri="bean:[ROUTE2_ENRICHBEAN]" />
<convertBodyTo type="byte[]" inheritErrorHandler="true" />
<to uri="activemq:[ROUTE1_QUEUE]?priority=5" inheritErrorHandler="true" />
</route>
Code: Select all
<route autoStartup=[ROUTE2_AUTOSTART]>
<description>[ROUTE2_DESC]</description>
<from uri="file://[ROUTE2_SOURCEPATH]?consumer.delay=5000&preMove=.process&move=../.done&moveFailed=../.error"/>
<to uri="bean:[ROUTE2_ENRICHBEAN]" />
<convertBodyTo type="byte[]" inheritErrorHandler="true" />
<to uri="activemq:[ROUTE2_QUEUE]?priority=5" inheritErrorHandler="true" />
</route>
Code: Select all
<route autoStartup=[ROUTE3_AUTOSTART]>
<description>[ROUTE3_DESC]</description>
<from uri="file://[ROUTE3_SOURCEPATH]?preMove=.process&move=../.done&moveFailed=../.error&delay=10000"/>
<to uri="ftp://[ROUTE3_FTPUSER]@[ROUTE3_FTPSERVER][ROUTE3_FTPPATH]?password=[ROUTE3_FTPUSERPSSWD]&binary=true&passiveMode=true&disconnect=true"/>
</route>
Code: Select all
<route autoStartup=[ROUTE4_AUTOSTART]>
<description>[ROUTE4_DESC]</description>
<from uri="ftp://[ROUTE4_FTPUSER]@[ROUTE4_FTPSERVER][ROUTE4_FTPPATH]?password=[ROUTE4_FTPUSERPSSWD]&include=.*?pri.csv&passiveMode=true&delay=60000&preMove=.process&move=../.done&moveFailed=../.error"/>
<to uri="file://[ROUTE4_SINKPATH]"/>
</route>
How can I do xml writes depending on properties? Any other highly welcomed ideas?
Thanks in advance
Jimmy
FOLLOW US
Get the latest news in Application Packaging