Skip to main content
The Script connector provides the ability to perform functions or operations that are not otherwise available in the built-in connectors of CData Arc.

Key Capabilities

  • Custom business logic implementation using ArcScript or Python
  • Access to full message context including message headers and file content
  • Integration with external libraries and system commands (Python)
  • Support for complex data transformations and business rule processing
  • Batch group message processing using the connectorBatchGroupRead ArcScript operation

Overview

Script connectors use the powerful ArcScript scripting language to accomplish a wide range of custom behavior. The script configured in the connector is run each time a document is placed in the Transactions tab for the connector. The input document can be read and modified in the script, or the input document can simply trigger an external function configured in the connector. Script connectors can also be configured to run on a schedule via Receive automation on the Automation tab. These are a few of the tasks you can configure a Script connector to do:
  • Replace values in the input document with data returned from custom SQL queries
  • Call a custom Web service to invoke a specialized workflow
  • Run an external script or executable via the sysExecute operation
After you decide the appropriate task for your Script connector, read the Scripting documentation to explore how to call various operations using ArcScript.

Connector Configuration

This section contains all of the configurable connector properties.

Script Tab

Options related to writing and testing the script.

Actions

Settings Tab

Configuration

Settings related to the core operation 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 Settings

Advanced Tab

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.

Other Settings

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.

Automation Status

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. Options on this tab vary depending on the connector’s action type:
  • If your connector is a Trigger, use the Receive button to start the flow.
  • If your connector is a Transform or Terminal, use the Upload Files button to upload files to the flow.

Using the arc:push Keyword

The arc:push keyword is commonly used in Script connectors to pass items to the output feed of the script. In addition, when you select an Output attribute from the Insert Options menu, if an arc:push keyword is not already included in the script, Arc auto-injects it so the script can work. Following are three common use cases. 1 Create and output a file:
2 Pass an input file as output:
3 Write entries to the Script connector log file:

Macros

Examples