Managing Output Formats
Single and chain processes 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 actions:
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 |
Show permalinks | Show links that can be used from third party applications to link to the object |
Add to navigation bar | Add the current object to the navigation bar |
New format | Create a new format |
Filter > New Filter | Create a new format filter |
Filter > Edit Filter | Edit current format filter |
Filter > Delete | Delete current format filter |
Filter > Duplicate Filter | Create a copy of the filter |
Filter > Export Filter | Export the filter into a CAR file |
Filter > Add to navigation bar | Add the filter to a navigation bar |
Filter > Create filter from search | Create a filter from the current IntelliSearch query |
Mapping of files to formats
The system's process server 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 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 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 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 Type text/plain;charset=ISO-8859-5
and Extension cyr
.
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.
Finding Formats
You can search for formats using filters and the Search Formats box on the Formats tab. This box is known as the IntelliSearch box and located under your username on the top right-hand side of the user interface. Filters allow you to specify a list of objects with static criteria. IntelliSearch allows you to specify complex queries in a simple way using prefixes. Prefixes are used to specify which property you are searching in and have short as well as long syntaxes. For example, if you want to display all formats with the term W3C in the comment, you would use the search criteria as follows:
c:W3C
You can search more than one property, as follows:
c:W3C n:XML
note
No spaces should be entered before or after the colon (:).
The following table illustrates the available prefixes for formats:
Prefixes | Description |
n, name | searches the name property |
c, comment | searches the documentation property |
d, description | searches the description property |
a, application | searches the application property |
cb, changedbefore | (internal) search for formats that changed before a certain [ISO-8601 period](IntelliObjectSearch#iso-8601-period-syntax) |
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
Privilege | Description |
Format.Create | Create formats |
Format.Delete | Delete formats |
Format.Edit | Edit formats |
Format.View | Access formats |
The Security tab allows you to specify which users can access, edit, and delete the format.
Procedure
- Choose "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
- Choose "Definitions > Formats" in the Navigation bar.
- Choose New Format and fill in the values below.
- Choose Save & Close to save the new format and close the edit window.
Name: OpenDocumentText
Description: OpenOffice.org Writer file
Comment: OpenOffice.org Writer file
Extension: odt
Mime Type: application/vnd.oasis.opendocument.text