Skip to main content
The Finalize connector completes a deferred source message. Place it at the end of the success path of a flow to confirm that the flow processed a file successfully, so the connector that received the file can perform its post-processing, such as deleting the source file. The Finalize connector is included with CData Arc and does not require a separate license.
Only the File connector can defer finalization. Other source connectors do not support this feature.

Key Capabilities

  • Deferred cleanup of source files, so a received file is not deleted until the downstream flow succeeds
  • Automatic timeout handling that releases pending files for another receive without deleting the source
  • No configuration required to link to the source connector, because the message carries the information needed to find it
  • Clear error messages when a message cannot be finalized

Overview

By default, a source connector such as the File connector completes a message as soon as it receives it. Any post-processing, such as deleting the file from the source folder, happens immediately, even if the downstream flow later fails. When you enable Defer received-file finalization on the File connector, the connector holds each received file in a pending state instead. The Finalize connector completes the pending file after the rest of the flow succeeds. When a message reaches the Finalize connector, the connector:
  1. Reads the deferred source information that the message carries.
  2. Finds the source connector that received the file.
  3. Tells the source connector to finalize the file, which triggers the source connector’s configured cleanup (for example, deleting the file when Delete files (after received) is enabled).
The Finalize connector has no output. It can only be used as the last connector in a flow.

Connector Configuration

This section contains all of the configurable connector properties.

Settings Tab

Settings related to the core configuration of the connector.
SettingDescription
Connector IdThe static, unique identifier for the connector.
Connector TypeDisplays the connector name and a description of what it does.
Connector DescriptionAn optional field to provide a free-form description of the connector and its role in the flow.

Advanced Tab

Other Settings

Logging

Settings that govern the creation and storage of logs.

SettingDescription
Log LevelThe verbosity of logs generated by the connector. When you request support, set this to Debug.
Log Subfolder SchemeInstructs the connector to group files in the Logs folder according to the selected interval. The Weekly option (which is the default) instructs the connector to create a new subfolder each week and store all logs for the week in that folder. Leaving this setting blank tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders helps keep logs organized and improves performance.
Log MessagesCheck this to have the log entry for a processed file include a copy of the file itself. If you disable this, you might not be able to download a copy of the file from the Transactions tab.

Miscellaneous

Miscellaneous settings are for specific use cases.

SettingDescription
Other SettingsEnables you to configure hidden connector settings in a semicolon-separated list (for example, setting1=value1;setting2=value2). Normal connector use cases and functionality should not require the use of these settings.

Automation Tab

Automation Settings

Settings related to the automatic processing of files by the connector.

Performance

Settings related to the allocation of resources to the connector.

SettingDescription
Max WorkersThe maximum number of worker threads consumed from the threadpool to process files on this connector. If set, this overrides the default setting on the Performance Settings portion of the Advanced Settings page.
Max FilesThe maximum number of files sent by each thread assigned to the connector. If set, this overrides the default setting on the Performance Settings portion of the Advanced Settings page.

Alerts Tab

SLAs Tab

Transactions Tab

This tab lists all messages associated with the connector. Use the search bar to find specific messages, or click the funnel icon to apply a filter. You can filter by time, message direction, and/or status.

Using Finalize with the File Connector

To delay deletion of a received file until the flow succeeds:
  1. On the File connector that receives the files, enable Defer received-file finalization and, if you want the source files removed, Delete files (after received). See Receive.
  2. Build the rest of the flow that processes the file.
  3. Add a Finalize connector and connect it to the Success Path of the last connector that processes the file.
For example, a flow that receives files with a File connector, translates them with an X12 connector, upserts the data into SQL Server, and then finalizes them is configured as follows: A flow with a File connector, an X12 connector, a SQL Server connector, and a Finalize connector
  1. The File connector receives a file from its configured path and holds it as pending.
  2. The X12 connector translates the file to XML.
  3. The SQL Server connector upserts the XML data into SQL Server.
  4. The SQL Server connector’s Success Path is connected to the Finalize connector, which completes the pending file.
Only the File connector that receives the files at the start of the flow can defer finalization. A File connector later in the flow that sends files to a folder does not defer anything, but the flow can still end with a Finalize connector that completes the original file. The file remains pending, and is excluded from being received again, until one of the following happens:
  • The file reaches the Finalize connector. The File connector completes the file and performs the configured cleanup.
  • The pending timeout is reached. The Receive Pending Timeout (minutes) setting on the File connector’s Automation tab controls this timeout. The message is marked with a Pending Timeout error, the source file is not deleted, and the file is released so that it can be received again.
Messages that do not come from a connector with deferred finalization enabled cannot be finalized. Sending a regular message to the Finalize connector results in an error.

Source File Changes

If the source file changes between the time it is received and the time it is finalized, the connector does not delete it. The application log contains the following message, where {0} is the name of the file: Source file '{0}' changed after it was received. Deferred finalization will not delete it.

Pending Timeout

The Receive Pending Timeout (minutes) setting on the File connector’s Automation tab controls how long a received file stays pending. The default is 10 minutes, and setting it to 0 keeps files pending indefinitely. If a pending message is not finalized before the timeout elapses:
  • The application log records that the message exceeded the pending timeout while waiting for finalization.
  • An error notification is sent with the subject Send Failure: Pending Timeout.
  • The message is marked with a Pending Timeout error. This appears as Error in the Transactions tab.
  • The source file is not deleted, and the file becomes eligible to be received again.
The pending-message check runs as the Check Pending automation action. At the Debug log level, the automation log records each check and the number of timed-out messages it handled.

Deferred Message Information

A file that is held for deferred finalization carries extra information in its message headers. To view the headers, open the message on the Transactions tab of the File connector and go to the Details tab.

Troubleshooting

The Finalize connector reports the following errors when it cannot complete a message.