Daniel Bevenius [
http://community.jboss.org/people/beve] replied to the discussion
"Smooks-Is it possible to add dynamic date to the file name under
file:fileNamePattern element?"
To view the discussion, visit:
http://community.jboss.org/message/555344#555344
--------------------------------------------------------------
Hi,
you could create a new Date instance in your smooks configuration and then referens it in
the fileNamePattern element.
For example:
<smooks-resource-list>
<jb:bean beanId="myDate" createOnElement="order-item"/>
...
<file:outputStream resourceName="orderItemSplitStream"
openOnElement="order-item">
<file:fileNamePattern>order-${order.orderItem.itemId}-${myDate?date}.xml</file:fileNamePattern>
...
</smooks-resource-list>
The format that Freemarker uses, above specified as '?date', can be configured.
You can find more information about the formatting
http://freemarker.sourceforge.net/docs/ref_builtins_date.html#ref_builtin...
here
Regards,
/Daniel
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/555344#555344]
Start a new discussion in JBoss ESB Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]