Skip to main content
Skip table of contents

restoreString

Restores a String previously stored with storeString or storeStringSet. The restored String may optionally be parsed into a different type of value.

If you wish to restore several values, instead of multiple restoreString commands you may be able to make use of restoreStringSet instead to reduce the command count.

Attributes

var

Required

Value type

EL-evaluated

Yes

String

No

Defines the name of the variable that will hold the restored String or the result of it being parsed as defined by parser.

key

Required

Value type

EL-evaluated

Yes

String

Yes

Name of the stored String to restore. Corresponds with thekey attribute of the storeString command.

parser

Required

Value type

EL-evaluated

No

String

No

Defining a value for this attribute causes the restored String to be parsed into a different kind of value. This should match with the format of thestoreString that stored the value.

The following values may be used:

  • "json"
    The restored String is parsed as JSON, resulting in a Map or a Collection containing more values as defined by the JSON content.

  • "file"
    The restored String is parsed into a File.

  • Name of a Parser
    The restored String is parsed with the named Parser into a kind of value that the Parser produces.

If left undefined, the restored String will appear in the variable context as just a String.

readFrom

Required

Value type

EL-evaluated

No

File

Yes

The resolved File value is where the String to be restored is expected to be stored in. The File may be a Document application, an Office template or a PDFdocument.

If this attribute is not defined, the String is restored from the Document application or Office template in which this command exists in.  

Examples

The storeString and restoreString commands are most commonly used to have a PDFfile produced by the logic to act as a storage for data related to the life cycle of whatever process the PDF is part of. In this model storeString stores something into the PDF, such as selection the user did during the Flow. The PDF is then saved somewhere where the Flow can find it on the next run.

CODE
<storeString key="selectedAttachment" value="${selectedAttachmentId}" storeTo="${exportedPDF}">

When the Flow is run again, it finds the PDF and restoreString reads the selection from it, allowing the logic to make use of this data, such as have the past selection to be pre-selected on a Screen.

CODE
<restoreString var="selectedAttachmentId" key="selectedAttachment" readFrom="${existingPDF}">
JavaScript errors detected

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

If this problem persists, please contact our support.