StreamToFile Activity

The StreamToFile activity writes a file to the disk from the output data stream.

General Tab

The General tab has the following fields.

Field Literal Value/ Module Property/ Process Property? Description
Name No The name to be displayed in the process definition
Description No A short description of the activity

Create Non-Existing Directories (Optional)

No

When this check box is selected, the activity creates all directories in the specified path, if they do not already exist.

If this check box is not selected and one or more directories in the specified path do not exist, it throws an exception.

Input Tab

The input for the activity is the following.

Input Item Datatype Description
outputStream Object Reference The output stream mapped from activities such as GetFragment and XMLTransform
fileName String The path and the name of file where the output stream data is to be written

Output Tab

The output of the activity is the following.

Output Item Datatype Description
fileName String The complete path where the file is written on the disk.
Note: By default, any existing file is over-written. It cannot be appended.

Fault Tab

The Fault tab lists the possible exceptions that can be thrown by this activity. See TIBCO ActiveMatrix BusinessWorks Error Codes for more information about the error codes and corrective actions to take.

Exception Thrown When...
FileNotFoundException Cannot find the file provided in the filename parameter.
FileIOException No such file or directory exists for the output file name.
StreamToFileException

An invalid output stream is mapped as input to the activity.

Properties

To set the number of threads used to create the fragment files, set the bw.plugin.largeXml.streamWriter.maxThreads plug-in property. The default is 10 threads.