Properties of the StreamingUnit context

Property Description
Stream

Returns the IOdinStream interface. Script alias: stream.

The interface has the following functions:

  • AppendDocument
  • GetProperty
  • LoadDocument
  • SetProperty
HasStream TRUE = A stream object exists in the Stream context property.
GetOrganisationalMetadata (key)

Function that produces the value of a key in the organisational metadata. If a key is not present, an exception is thrown.

Used organisational metadata depends on the exit point:

  • In the OnStackStart and OnStackEnd exit points, the organisational metadata of the current stack is used.

  • In the OnEnvelopeStart and OnEnvelopeEnd exit points, the organisational metadata of the current envelope is used.

  • In the OnDocumentStart and OnDocumentEnd exit points, the organisational metadata of the current communication is used.
HasRecipient Flag that indicates whether the recipient information is available for the distributed communication. Always set to false for the OnStackStart and OnStackEnd exit points.
PrinterName Name of the printer used to distribute the communication. Unavailable for the OnStackStart and OnStackEnd exit points.
RecipientType Recipient type of the distributed communication. Unavailable for the OnStackStart and OnStackEnd exit points.
GetRecipientData (key) Function that produces the value of a contact field in the recipient information of the distributed communication. Throws an exception if the contact field does not exist.
HasSender Flag that indicates whether the sender information is available for the distributed communication. Always set to false for the OnStackStart and OnStackEnd exit points.
GetSenderData (key) Function that produces the value of a contact field in the sender information of the distributed communication. Throws an exception if no sender information is available, or if the contact field does not exist.
GetScriptData (level, key) Retrieves a key/value pair. Throws an exception if the script tries to access an unavailable level, or if the key is not present for the level (see the table about levels and scopes later in this section).
SetScriptData (level, key, value) Function that writes a key/value pair at the specified level. Allows the streaming scripts to transfer data between the exit points. Throws an exception if the script tries to access an unavailable level, or if the key is not present for the level.

Level Scope Availability
0 Stack Available in all exit points.
1 Envelope Available in the OnEnvelope, OnDocument, and OnPage exit points.
2 Document Available in the OnDocument and OnPage exit points.

In the OnDocumentStart and OnDocumentEnd exit points, additional properties are displayed:

Property

Description

RequestReference

Reference of the request from which the document originates.

CorrespondenceReference

Reference of the correspondence from which the document originates.

CommunicationLabel

Label of the communication from which the document originates.

SlotName

Slot name of the document (it refers to the Slot Identifier in the Document Pack Template).

SlotTypeName

Name of the slot type of the document.

These extra properties are not set for cover letters added in the Bundling step.