<!-- Setting the target file, mode and data on the input item. This example pulls data from existing message headers to append to a csv file. -->
<arc:set attr="input.file" value="/tmp/orders.csv"/>
<arc:set attr="input.mode" value="append" />
<arc:set attr="input.data">[header:orderno],[_|now('MM-dd-yyyy HH:mm')],[header:itemsku],[header:itemqty]\n</arc:set>
<!-- Calling fileWrite and passing in the input item -->
<arc:call op="fileWrite" in="input" out="result">
<!-- Optional: Logging information about the modified file to the application log -->
<arc:set attr="_log.info" value="The [result.file:file] file was updated at [result.file:cdate] with a new order."/>
</arc:call>