The File Adapter (WebSphere Adapter for Flat Files) is used in Integration Designer (IID) modules to read and write files as if they were services - typically to feed a BPEL / mediation flow with batch input or to drop output files for other systems. It has two sides:
- Inbound (event-driven): the adapter polls a directory (EventDirectory), splits each file into records with a delimiter or a fixed length (SplitCriteria, SplittingFunctionClassName), converts them with a data binding (XML, delimited "flat" records, or your own DataBinding class) and calls the module's export - one event per record or per file; processed files are archived (ArchiveDirectory) or deleted. Event persistence in the adapter's event table guarantees once-only delivery across restarts.
- Outbound (invoked by the flow): Create, Append, Overwrite, Retrieve, List, Delete, Exists operations against a directory (OutputDirectory), with the same data bindings to turn business objects into file records; staging directory + rename gives atomic writes.
Inbound example (module "OrdersInbound"):
EventDirectory = /data/in ArchiveDirectory = /data/archive FileExtensions = csv
SplitCriteria = "\n" DataBinding = delimited (Order BO; delimiter ";") PollPeriod = 5000 ms
Export "OrdersInboundExport" -> mediation flow -> BPEL process "ProcessOrder" (one instance per record)
Where it fits with BAW: IID / BPEL is part of BAW Advanced (the Process Server "Advanced" deployment environment); BPD-only installations do not have the adapters - there you read files with a Java integration or a script (question 2990), or let IIB / ACE do the file handling. Typical usage answers: nightly batch imports, legacy exports for a mainframe, integration with SFTP drop zones (combined with the FTP adapter), and log / audit exports.
References