ibm.ReturnDataPipeAdded by IBM on May 5, 2011 | Version 1 (Original)
|Creates a View using given content and mimetype. This pipe also contains special handling of XFDL form content.
Creates a View using given content and mimetype. This pipe also contains special handling of XFDL form content.
There are additional configuration parameters for XFDL files and for forms that are being used in a Webform Server environment.
Table 1. Table containing expressions and their descriptions for ibm.ReturnDataPipe
|content||key||Specifies the key used to access the content. Valid values are:
- byte 
|mimetype (optional)||string||Mime type of the returned data.|
|filename (optional)||string||The name that is to be given to the content when saving. |
Default: Untitled. If it is a form, the default would be Untitled.xfdl.
|pidOutputs.main ||pipe||Triggers the next pipe in the pipeline.|
Additional parameters for XFDL form content
Table 2. Table containing expressions and their descriptions for XFDL form content
|xfdlHandlingMode (optional)||string||Determines the method for handling XFDL content. Valid values are:
Note: If you are using the standalone Java™ Access API, you cannot use ReturnDataPipe when the xfdlHandlingMode parameter is set to autoDetect or html.
- xfdl (default) – XFDL content will not be translated to HTML
- html – XFDL content will be translated to HTML via Webform Server.
- autoDetect – If the client has the Viewer installed, the content will be returned as XFDL.
If no Viewer is detected and Webform Server is installed, then the content will be translated to HTML via Webform Server. Otherwise, the content will simply be returned as XFDL.
Additional parameters for XFDL forms translated to HTML using Webform Server
Table 3. Table containing expressions and their descriptions for forms translated from XFDL to HTML
|translatorLocation (optional)||string||The location of the Webform Server Translator to be used for translating XFDL to HTML. |
Note: If you define a value for this parameter, it will override the global ibm.WebformTranslatorHttp.default.translator Location parameter.
|cancelURL (optional)||string||The URL that defines the pipeline to run if the form is cancelled.|
|xformsReplace AllSubmitURL (optional)||string||The URL that defines the pipeline to run if an XForms replace all submission occurs.|
Configuration - Using Webform Templates
Table 4. Table containing expressions and their descriptions for using templates with Webform Server.
|templateId||set||resolvable to String||The id of the template that was previously loaded |
|instances (optional) ||set||resolvable to List|| Each element within this optional List should contain a map. Each map should contain two to four values. See the following list for details.|
- Map key instance (required) – This should resolve to a String, byte  or InputStream that represents the XML instance.
- Map key ref (required) – This should resolve to a String that represents the XPath to the instance to be modified.
- Map key flag (optional) – This should resolve to a String that equals one of the following:
- If the flag is not provided or is invalid, UFL_XFORMS_UPDATE_REPLACE will be used.
- Map key model (optional) – This should resolve to a String that matches the model to be modified. If not provided, the default model will be used.
In the following example, a simple HTML page is returned:
- If the content data is a String it is converted to a byte  using UTF-8 encoding.
- ReturnDataPipe can be used to collect a form object preserved by another pipe (such as LoadFormPipe) and return it to the user.
To do this:
- Identify the form object you want to return to the user. This object is specified by the key it was stored under.
ibm.ReturnDataPipe.SamplePipeline.content = key:sampleForm
- To display a form, you must use the application/vnd.xfdl mimetype.
ibm.ReturnDataPipe.SamplePipeline.mimetype = string:application/vnd.xfdl
- autoDetect mode assumes that the current request originated from a standalone Viewer 3.0 or newer, or from a Web browser with the response being returned to that Web browser. autoDetect mode cannot be used when accessing the Forms Services Platform with requests created via the PlatformJavaAccess.createRequest(String pipelineURI) method or when handling a submission from a standalone Viewer older than version 3.0
- You cannot use ReturnDataPipe when the xfdlHandlingMode parameter is set to autoDetect or html to submit a form from a standalone Viewer to a pipeline that will return any form back to the user. You can use ReturnDataPipe if you submit and return the form using a browser-embedded Viewer.
- Under certain circumstances, using html or autoDetect with cancelURL and xformsReplaceAllSubmitURL will not work when forms are rendered with Webform Server.
The following scenario will not work: Form A with URL http://server:port/wfsp/wfsp/samplePipe is rendered with Webform Server. Form A has a Cancel button or a button that performs an XForms replace all submission. When one of these buttons is clicked, form B is rendered in Webform Server. In the same browser session, if you load form A again with the same URL, form A will load but neither the Cancel button nor the XForms Replace All button will work.
Parent topic: Pipes