Skip to main content
Skip table of contents

returnString

This command is deprecated and doesn’t work with Task or Batch API.

The API functionality requires additional licenses. Please contact support@documill.com to enable the licenses.

Defines the output of a composing process initiated through the Dynamo API. The resolved value of the value attribute is converted into a String, if it isn't one already, and returned to the API caller. Additionally, the current Step of the Flow ends, leaving any commands following returnString unevaluated. As this command ends the Step without specifying a next Step, it also finishes the current Segment. If this command or returnDocument is not present in the document, the API caller will receive no output from Dynamo. However, the composing process may still produce output by creating Salesforce records, for example.

This command works together with the Dynamo API parameter "contentType", which allows the content type of the returned String to be set. By default the response comes with content type of "text/plain", but if the returned String is JSON-formatted, the content type could be set to "application/json".

As the Dynamo API only handles Flow-based templates, this command does nothing in Controller-based templates besides ending the current event handler.

Attributes

value

Required

Value type

EL-evaluated

Yes

Any

Yes

Defines the output of the composing process. The resolved value can be of any type, but if it isn't a String, it will be converted into one.

Examples

The returnString command can be useful in returning non-File products of the logic Flow in JSON format. Many kinds of basic variable values, such as Maps and Collections, transform nicely into a JSON String with the toJSON command.

CODE
<toJSON var="jsonResult" value="${resultsMap}"><returnString value="${jsonResult}">
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.