Klevr Product Documentation logo

Outbound File Share Binary Stage

The Outbound File Share Binary stage allows binary messages, such as PDFs and images, to be exported to a Windows file share.

Stage Overview

The Outbound File Share Binary stage allows binary formatted messages (e.g. PDFs, images, etc.) to be exported from the Integration Hub service to a Windows file share location.

For sending text-based messages to a Windows file share location, see the Outbound File Share stage.

The Outbound File Share Binary stage was added in Integration Hub v6.0.0.

Stage Definition File Location

All Outbound File Share Binary stages are defined by creating an appropriately formatted JSON definition file in the following location:

interfaces
{businessUnitCode}
{domainCode}
{integrationName}
out
fs-binary
{STAGE_NAME}.json

Stage JSON Definition File Format

The JSON definition file for an Outbound File Share Binary stage is as follows:

{
  "name": "stage-name",
  "displayName": "Brief Stage Title",
  "description": "Brief description of the stage.",
  "enabled": "$env:STATUS_<INTEGRATION_NAME>",
  "source": "source-event",
  "concurrency": 10,
  "enableVnet": true,
  "fileSystemDetails": {
    // See Outbound File Share stage
  },
  "emitEvent": "previous-stage-name-1",
  "emitError": false,
  "emitErrorTerminateSuccess": false,
  "leaseLockName": "lock-name",
  "preLogTransformSchemaFileName": "schemas/path/to/schema/schema-name.liquid",
  "preLogTransformSchemaType": "liquid|javascript",
  "preLogTransformFormat": "json|xml|csv"
}
PropertySub-PropertyDescription
nameThe name of the stage.
displayNameOptional (but highly recommended). A short (3 or 4 word) "display name" for the stage, used as a "title" of the stage in the Integration Hub Portal service's self-documentation capability.
descriptionOptional (but highly recommended). A brief (10 to 15 word) description of the stage, used as a brief description of the stage's purpose in the Integration Hub Portal service's self-documentation capability. For a more detailed explanation (when needed), use the stage markdown feature.
enabledOptional boolean flag (true or false). Default is true.

Generally set via a DevOps variable. Controls if the stage is deployed enabled or not.
sourceThe source event that the stage subscribes to. See Pub/Sub Model.

Alternatively, sources may be supplied, and an array of one or more source events can be subscribed to.
concurrencyOptional number of concurrent runs permitted for the stage. Default is 10.
enableVnetOptional. Boolean flag to indicate if the file share connection should use VNet integration to ensure the use of a fixed IP address or not. Default value is false.

VNet integration is only supported when deploying using Standard Logic Apps.
fileSystemDetailsDetails of the Windows file share to send the binary payload to. The options are the same as the Outbound File Share stage.
emitEventWhen the upload to the file share is successful, the stage will normally terminate. However, under certain circumstances, it may be desirable to continue workflow processing.

The optional emitEvent flag allows the payload of a previously run stage to be output as a message from this stage. The stage must have previously been executed in the run history of the overall Integration Hub integration, with the stage's exported payload details being present in the Cloud Event Attributes section.
emitErrorOptional boolean flag (true or false). Default is false. When true, the stage will capture and emit a payload if a non-retryable error is detected, or if a retryable error is detected on the final retry attempt. See the Emit Error Payload section below for more details.
emitErrorTerminateSuccessOptional boolean flag (true or false). Default is false. When true, and when emitError is also true, the stage will terminate with a Successful state, rather than a Failed state, in the event of an error being detected and emitted.

When the stage is configured to operate in this way, the integration should be defined so that a subsequent stage, or series of stages, will be triggered by the emitted error payload to "handle" the error condition in such a way that reporting and alerting on the error (as would happen if the stage terminated with a Failed state) is unnecessary.
leaseLockNameOptional. See Lease Locking.

Pre-Logging Transformation

This stage supports the optional pre-logging transformation feature using the following fields:

  • preLogTransformSchemaFileName
  • preLogTransformSchemaType
  • preLogTransformFormat

See the Pre-Logging Transformation for details.

Required Payload Format

This stage must be triggered with a payload in the following format:

{
  "filename": "filename.pdf",
  "base64": "base64pdf"
}
PropertyDescription
filenameThe full name of the file that will be created on the file share service.
base64A Base64 encoded string of the file's contents. This string will be decoded into binary during creation of the remote file on the file share.

Emit Error Payload

In the event that the emitError option has been set to true and:

  • a non-retryable error is detected when calling the external Windows file share; or
  • a retryable error is detected on the final retry attempt

then the stage will emit an error payload.

There is no defined format for the error payload that is emitted, as it depends on the Windows file share service.

The event used to emit the payload will be the full stage name with -error appended, e.g. out-fs-binary-stage-name-error.

Last updated on