Managing Output Formats
Chain Processes and process can produce different kinds of output, the file type can range from plain text files to PDF or ZIP files. To allow the browser to use the correct application to open the output file, a MIME type needs to be specified. Formats can be attached to Chains or Process Definitions to specify the output format and MIME type.
A format describes file content types, such as text or Postscript. A format can be assigned to a Process Definition's output or log format, thus defining the extension and MIME ( M ultimedia I nternet M ail E xtensions) type to use for the files. The application used to view a file depends on your browser, and your browser settings.
Note: Formats should have a unique extension as the formats are looked-up by extension and the first format found will be used.
Formats are part of the Definitions section in the navigation bar. The following standard formats are provided with Redwood Server:
Name | Description | Documentation | Extension | Mime Type |
---|---|---|---|---|
TextLog | Text Log | A plain text log file. | log | text/plain |
PlainText | Plain Text | A generic plain text file; this format makes no assumptions on line endings. | txt | text/plain |
CronacleArchive | Cronacle Archive | A CAR file containing exported objects as well as an uploader class that allows you import objects from the command line. | car | application/java-archive |
JavaArchive | Java Archive | A JAR file, usually containing Java packages and classes. | jar | application/java-archive |
HTMLText | HyperText Markup Language | A plain text file with HTML markup, can be used as the message of the day. | html | text/html |
CSV | Comma-Separated Values | A text file containing data in character-separated values. | csv | text/csv |
XMLText | eXtensible Markup Language | A plain text file containing XML data. | xml | text/xml |
Zip | Zip Archive | A compressed binary file containing one or more files and/or folders. | zip | application/zip |
OctetStream | Object Data | A binary file. |
|
application/octet-stream |
PortableDocumentFormat | Portable Document Format | A fixed-layout document in PDF format. | application/pdf | |
HTMLFragment | HyperText Markup Language Fragment | A fragment of HTML that can be embedded in extension points. | html | text/html |
System_Excel | Microsoft Excel | A spreadsheet file in the Excel 97 to 2003 format. | xls | application/vnd.ms-excel |
System_Excel_xml | Microsoft Excel XML format | A spreadsheet file in the Excel 2007 or later format. | xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
System_Excel_xmlm | Microsoft Excel XML macro-enabled workbook template format | A spreadsheet file in the Excel 2007 or later format with macros enabled. | xlsm | application/vnd.ms-excel.sheet.macroEnabled.12 |
System_Word | Microsoft Word | A word processor file in the Word 97 to 2003 format. | doc | application/msword |
System_Word_xml | Microsoft Word XML format | A word processor file in the Word 2007 or later format. | docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
System_Word_xmlm | Microsoft Word XML macro-enabled workbook template format | A word processor file in the Word 2007 or later format with macros enabled. | docm | application/vnd.ms-word.document.macroEnabled.12 |
System_PowerPoint | Microsoft Powerpoint | A slideshow file in the PowerPoint 97 to 2003 format. | ppt | application/vnd.ms-powerpoint |
System_PowerPoint_xml | Microsoft Powerpoint XML format | A slideshow file in the PowerPoint 2007 or later format. | pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation |
System_PowerPoint_xmlm | Microsoft Powerpoint XML macro-enabled workbook template format | A slideshow file in the PowerPoint 2007 or later format with macros enabled. | pptm | application/vnd.ms-powerpoint.presentation.macroEnabled.12 |
System_JSON | JavaScript Object Notation | A plain text file containing data in the JSON-format. | json | application/json |
System_PNG | Portable Network Graphics Image Format | An image file in the PNG format. | png | image/png |
System_JPEG | Joint Photographic Experts Group Image Format | An image file in the JPG format. | jpg | image/jpeg |
PLSQL | PL/SQL file | A plain text file containing PL/SQL source code. | pls | application/sql |
System_RTX | Redwood Table XML format |
|
rtx | text/xml/ |
Context Menu
Formats support the following context menu options.
Note: For generally applicable object context menu options, see Object Context Menu.
Action | Description |
---|---|
Edit Security | Edit the security of the format |
Duplicate | Make a copy of the format to create a similar one |
Delete | Delete the format |
Export > Export | Export the format into a CAR file |
Export > Export with related objects | Export the format into a CAR file including referenced objects |
Promote > Promote to system | Promote the object to a remote system |
Promote > Edit further then promote | Edit the Export Rule Set prior to promoting |
Promote | Promote the format to another Redwood Server instance |
Edit | Edit the format |
Add to navigation bar | Add the current object to the navigation bar |
New format | Create a new format |
Mapping of files to formats
The system's Process Server Platform Agents will try to assign a format to every file created by the processes. For some files the system knows exactly what the content is as it has generated them itself, for instance the Platform Agent log file. For others, it maps the extension of the process's filename to the list of possible formats. If that fails it uses the Default Output Format and Default Log Format attributes of the Process Definition. If those are not set it uses PlainText or TextLog. The difference between PlainText and TextLog files is small at the moment, but a future version of Redwood Server will allow smart browsing through TextLog files.
System process
For System process, the output is in PlainText format. The Platform Agent's error messages are in TextLog format.
SAP jobs
For SAP jobs the job log, the application logs and the job statistics log is in TextLog format. The default format of the spool files is PlainText. If the SAP system supports new XBP functionality for retrieving spool as PDF (see SAP Note 1280850 ), then the spool output of type OTF (SAP Script) is automatically converted into PDF, other types of spool will be retrieved as PlainText. If the Default Output Format of the SAP Process Definition is set to PortableDocumentFormat, then all spool files will be in PDF.
Operating System Processes
For Operating System processes run by the Platform Agent, the Platform Agent log (stdlog.log) is in TextLog format. The process' standard error stream (stderr.log) is in the Default Log Format, or if that is not set in TextLog format. The process's standard output stream (stdout.log) is in the Default Out Format, or else in Text format. Other files are mapped according to their extension. If this fails, the format is set to the Default Out Format, or else to Text format.
Automatic Extensions
Redwood Server appends extensions automatically to text files and HTML files, which do not already have a .txt
or .html
extension.
You can disable this by specifying one of the following:
@autoextension=false
- in the Documentation field of the format- Registry key
/configuration/jcs/mail/AutoExtension/<Format_Partition>/<Format_Name>=false
- Registry key
/configuration/jcs/mail/AutoExtension=false
Note that the settings are parsed in this order, the first setting found is used. If none are found, the default is true
.
Character Sets
By default, Redwood Server reads text files using the ISO-8859-1 character set (charset). You can specify the desired charset in the MIME Type field, semi-colon separated, after the MIME type.
For example, your process generates a file in the ISO-8859-5 (Cyrillic) charset and you wish to search the output file (for errors) or insert the output file into an email using the Mail Definition Type. You ensure its short name has a specific extension, cyr
for example, and you create a format named Cyrillic
with the MIME Typetext/plain;charset=ISO-8859-5
and Extensioncyr
.
Note that in the case where you want to embed the file in an email, you must also ensure that the email gets the correct charset by specifying Charset=ISO-8859-5
in the body
section.
Deleting Formats
You can only delete formats when no other objects relate to them. For example, if there are still processes or Process Definitions that reference the format, the format cannot be deleted until all references have been deleted. You can see all references to the format in Related Objects in the lower detail pane and on the show page.
The table in related objects contains three columns:
- Type - the type of object, like Process Definition for a Process Definition, with a link to it
- Related Object - the name of the object with a link to it
- Used As - objects can sometimes be used as different object types
For example, formats that are used in Process Definitions, will have the call-reference in Related Objects. The type will be Process Definition, for example and the Related Object will be the name of the Process Definition.
Note: When a Process Definition is displayed with a timestamp in the name, this indicates that there still is a process that refers to the format. You might have changed the Process Definition, but as long as that process is in the system you will not be able to delete the format.
Security
The privileges available in the Security tab are as follows.
For more information, see Security Tab.
Privilege | Description |
---|---|
Format.Create | Create formats |
Format.Delete | Delete formats |
Format.Edit | Edit formats |
Format.View | Access formats |
Procedure
- Navigate to Definitions > Formats.
- Choose Refresh to see all existing formats.
- Choose New Format to create a format.
- Fill in the details, refer to the section below.
- Choose Save and Close to save the format.
Format
- Name - The name of the format.
- Application - The name of the Application used to group this object.
- Description - The description of the format.
- Documentation - A comment about the format.
- Extension - The extension of files that use this format.
- MIME Type - The MIME type to use when sending this file to a web browser.
Example
Create a format for OpenDocument Text Files
- Navigate to Definitions > Formats in the Navigation bar.
- Choose New Format and fill in the values below.
- Click Save & Close to save the new format and close the edit window.
Name: OpenDocumentText
Description: OpenOffice.org Writer file
Documentation: OpenOffice.org Writer file
Extension: odt
Mime Type: application/vnd.oasis.opendocument.text