Developing Apama Applications > Developing Apama Applications in Event Modeler > Using Standard Blocks > The Utility blocks > File Writer v2.0
File Writer v2.0
The File Writer block lets a scenario write a line at a time to a specified file using the File adapter with the JMultiFileTransport transport plug-in and the JNullCodec codec plug-in. A single File Writer block can write to multiple files.
Parameters
Parameter
Description
Transport Name
The name of the instance of the JMultiFileTransport to use. This must match an instance name specified in the IAF configuration file.
File Name
The name of the file to write.
Append
A flag indicating whether to append to the end of a file, or whether to replace the contents of the existing file.
Line
The line to be written to the file identified by the File Name parameter.
File Channel
The name of the channel to output file events to. The various file events are defined in the FileEvents.mon file and they are defined in the com.apama.file package. You can find the FileEvents.mon file in the adapters/monitors directory of your Apama installation directory.
Operations
Operation
Description
Open File
Opens a file according to the current values of the Transport Name, File Name, Append and File Channel parameters.
Close File
Closes a file according to the current values of the Transport Name, File Name and File Channel parameters.
Write Line
Writes a line to the file identified by the current values of the Transport Name, File Name, Line and File Channel parameters.
Get File Status
Explicit call to update the Status output feed. Uses the current values of the Transport Name, File Name and File Channel parameters.
Input feeds
This block has no input feeds
Output feeds
Feed
Field
Description
error
file name
The name of the file that returned the error.
file transport
The name of the transport that returned the error.
message
The error message returned.
status
file name
The name of the file associated with the status update.
file transport
The name of the transport associated with the status update.
file currently open
A flag that indicates whether the file is currently open.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.