The File Serializer activity takes input data from users or File Parser activity and writes it to a file according to the specified schema.
General Tab
The File Serializer activity consists of the
General,
Description,
Advanced, Input, and
Fault tabs.
On the
General tab, you can specify the required parameters before you use this activity. The
General tab contains the following fields:
Field
|
Literal Value/Module Property?
|
Visual Diff?
|
Description
|
Name
|
No
|
Yes
|
The name to be displayed as the label for the activity in the process.
|
Configuration Resource
|
Yes
|
Yes
|
The reference to the Files for Unix and Windows Resource Configuration.
|
Schema
|
No
|
Yes
|
Schema is based on the XSD generated by the
Files for Unix and Windows Resource Configuration selected in
Configuration Resource field. Out of multiple schemas listed, only one schema is picked and processed at runtime.
|
Wip Creation Mode
|
No
|
Yes
|
The creation mode of the file in the working directory. The
File Serializer activity uses the working directory to create the file. Based on the semantics of Wip Creation mode options, the file is moved to the output directory with the following options:
- Append messages to file, close on Timer
Input records from multiple jobs are appended to a file created in the working directory. The file is closed and moved to the output directory on receiving the timer event specified in the
Elapsed field. And then a new file is created in the working directory.
- One job per file
Input records that are present in each job are written to a file and then moved to the output directory.
|
Output Creation Mode
|
No
|
Yes
|
Two options are available:
- Overwrite (always creates new file)
Overwrites the file, when moving a file from the working directory to the output directory.
- Append (if same file name exists)
Appends the text, when moving a file from the working directory to the output directory.
|
File Name
|
Yes
|
Yes
|
The name of the output file that is to be created.
Note: The filename cannot contain path information.
|
Close file after time elapsed (minutes)
|
Yes
|
Yes
|
The amount of time before the file is closed in the working directory. You can type a specific time in this field or use a module property. This field is available only when you select
Append messages to file, Close on timer in the
Wip Creation Mode list.
|
Description Tab
On the
Description tab, you can enter a short description for the activity.
The Visual Diff is supported for the
Description tab.
Advanced Tab
The
Advanced tab contains the following sections:
- Processing
- Processing Script
- Options for modifying output Filename
-
Encoding
The following table describes the fields in the
Processing section of the
Advanced tab for the File Serializer activity.
Field
|
Literal Value/Process Property/Module Property?
|
Visual Diff?
|
Description
|
Working Directory
|
Yes
|
No
|
Specifies the directory where contents for the actual output file are composed from input records.
When the files generated by
File Serializer activity are independent of each other, the activities share the working, output and error directories. Otherwise, the directories must be unique.
Note: On Unix, the processing directories such as the working directory, and the done or output directory are required to be on the same file system.
|
Output Directory
|
Yes
|
No
|
Specifies the directory where files in the working directory are moved to.
|
Error Directory
|
Yes
|
No
|
When an error occurs while moving a file from working directory to output directory, file in the working directory is moved to the error directory. For One job per file in WIP Creation Mode, if the file is already present in the working directory, it is moved to error directory with timestamp added in the file name.
|
Progress Directory
|
Yes
|
No
|
Specifies the directory where the progress file is written to. If no directory is specified in this field, the progress file is created in the directory where the plug-in is started.
|
Toggle Child Records Ordering
|
No
|
No
|
When it is set to
TRUE, the sequence of the child order is reversed in the generated file. When it is set to
FALSE, the sequence of the child orders does not change.
Note: Users can only reverse the order of the root parent's children. Order of the children of child record cannot be reversed.
|
The following table describes the fields in the
Processing Script section of the
Advanced tab for the File Serializer activity.
Field
|
Literal Value/Process Property/Module Property?
|
Visual Diff?
|
Description
|
Post Processing Script File
|
Yes
|
No
|
Specify the name of the script that needs to be executed after the input file is processed by the plug-in. Click
Browse to locate and load the script.
For file serializer activity, when using a post-processing script that did not resolve to the associated program or executable, the activity is unable to invoke successfully the post-processing script. To avoid this issue, when specifying the post-processing script please follow the convention, command::command_exec,command_file Example: command::C:\perl\bin\perl.exe,c:\temp\script.pl
When specifying the command_exec and command_file arguments, you must specify the absolute path.
For more information see
Pre and Post Processing Scripts
|
Post Processing Arguments
|
Yes
|
No
|
Arguments you want to pass to the postprocessing script. Arguments are strings and are optional. The sequence of arguments passed to the postprocessing script is determined as follows:
- The argument sequence contains the name of the file, the arguments specified in the postprocessing arguments, and the status. The status succeeds if the serializer processes the file successfully. The status fails if the serializer has problems (for example, parsing) processing the file.
|
The following table describes the fields in the
Options for modifying output Filename section of the
Advanced tab for the File Serializer activity.
Field
|
Literal Value/Process Property/Module Property?
|
Visual Diff?
|
Description
|
Append
|
No
|
No
|
Three options are available:
- None
Does not append anything to the filename.
- Timestamp
Appends a timestamp to the filename. The format is YYYYMMDDHHMMSSmm. Selecting this option activates the
Location field.
- Sequence Number
Appends a sequence number to the filename. Selecting this option activates the
Location and
Sequence Number Width fields.
|
Location
|
No
|
No
|
Two options are available:
A period (.) is assumed to be a separator between the prefix and suffix.
|
Sequence Number Width
|
No
|
No
|
Specifies the width of the sequence number. For example, when you select
4 as the width of the sequence number, the number that is appended to the file is
0000. The sequence number begins with
0 and is incremented for each file that is moved to the output directory. Upon reaching the maximum value for a given width, the sequence number rolls over.
When the plug-in is restarted,
File Serializer
activity remembers the previous sequence number and continues from there. Sequence Number is stored in Progress File
|
The following table describes the fields in the
Encoding section of the
Advanced tab for the File Serializer activity.
Field
|
Literal Value/Process Property/Module Property?
|
Visual Diff?
|
Description
|
File Content Encoding
|
No
|
No
|
Provides aliases for the following commonly used encoding for file contents:
ASCII,
ISO8859-1, UTF16_BigEndian,
UTF16_LittleEndian,
UTF-8, Shift JIS(CP943),
Shift JIS (TIBCO), EUC-JP,
Big5, and
Other.
Note: When an invalid or unsupported encoding string value is specified, an error is displayed at run time.
|
File Content Encoding Other
|
Yes
|
No
|
This field is available only when you select
Other in the
File Content Encoding list. For more information, see
File Content Encoding
|
End of Line
|
No
|
No
|
Specifies the line separator to be used in the output file
- System
The separator is runtime dependent. It follows the DOS convention on Microsoft platforms or the UNIX convention on UNIX platforms.
- DOS
A carriage return and line feed.
- UNIX
A line feed.
- Unicode
Unicode Line Separator. Use only in conjunction with UTF8, UTF16BE, or UTF16LE file encoding.
- User Defined
You can define the characters to mark the end of line. Specify the characters in the User Defined EOL field.
|
User Defined EOL
|
Yes
|
No
|
This field is available only when you select the
User Defined option from the
End of Line field. Enter the characters to mark the end of a line.
|
Input Tab
On the
Input tab, you can view the input data for the File Serializer activity. The values in the
Input tab are populated based on the schema selected in the
Schema field.
Fault Tab
The
Fault tab, has the following exceptions:
FileSerializerException
FileSerializerException will throw an error and cause the activity to stop. It contains the following fields:
Field
|
Type
|
Description
|
msg
|
string
|
The error message description returned by the plug-in.
|
msgCode
|
string
|
The error code returned by the plug-in.
|
errorMessage
|
string
|
The error message returned by the plug-in.
|
Copyright © 2022. TIBCO Software Inc. All Rights Reserved.