The Script Connector provides the ability to perform functions or operations that are not otherwise available in the built-in connectors of CData Arc.
Script Connectors use the powerful ArcScript scripting language to accomplish a wide range of custom behavior. The Script configured in the connector will be run each time a document is placed into the Send directory for the connector. The input document can be read and modified within 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 in the Automation tab.
The following are a few of the many different 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, you can use the Scripting section to explore how to call various operations using ArcScript.
This section contains all of the configurable connector properties.
Settings related to the core operation of the connector.
- Connector Id The static name of the connector. All connector-specific files are held in a folder by the same name within the Data Directory.
- Connector Description An optional field to provide free-form description of the connector and its role in the flow.
- Script The script to execute. Input and output parameters of the script are listed at the top of each Script Connector within an info tag. These parameters should be referenced but not edited.
Settings related to the automatic processing of files by the connector.
- Send Whether messages arriving at the connector will automatically be processed.
- Retry Interval The number of minutes that the connector will wait before retrying a failed script execution.
- Max Attempts The number of times that the connector will attempt to retry a failed script execution before raising an error.
- Receive Whether the connector should automatically run the script on a configured schedule.
- Execution Interval The unit of measure to use for the receive automation schedule (e.g. Minutes, Hours, Days, etc).
- Minutes The number of minutes to wait before executing. Only applicable when Send Interval is set to Minute.
- Minutes Past the Hour The minutes offset for an hourly schedule. Only applicable when Send Interval is set to Hourly. For example, if this value is set to 5, the automation service will execute the script at 1:05, 2:05, 3:05, etc.
- Time The time within a given day that execution should occur. Only applicable when Send Interval is set to Daily, or Weekly, or Monthly.
- Day The day on which execution should occur. Only applicable when Send Interval is set to Weekly or Monthly.
- Cron Expression An arbitrary string representing a cron expression that determines when execution should occur. Only applicable when Send Interval is set to Advanced.
Settings related to the allocation of resources to the connector.
- Max Workers The maximum number of worker threads that will be consumed from the threadpool to process files on this connector. If set, overrides the default setting from the Profile tab.
- Max Files The maximum number of files that will be processed by the connector each time worker threads are assigned to the connector. If set, overrides the default setting from the Profile tab.
Settings not included in the previous categories.
- Send Filter A glob pattern filter that determines which files in the Send directory should be processed by the connector. Patterns will exclude matching files if the pattern is preceded by a minus sign:
Multiple patterns can be specified, comma-delimited, with later filters taking priority.
- Parent Connector If set to a connector of the same type, this connector will inherit all settings from the Parent Connector unless directly overridden in the existing connector configuration.
- Log Subfolder Scheme Instructs the connector to group files in the Logs folder according to the selected interval. For example, the Weekly option instructs the connector to create a new subfolder each week and store all logs for the week in that folder. The blank setting tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders can help keep logs organized and improve performance.
- Log Messages Whether the log entry for a processed file will include a copy of the file itself.
- Save to Sent Folder Whether files processed by the connector should be copied to the Sent folder for the connector.
Settings for specific use cases.
- Other Settings Allows configuration of hidden connector settings in a semicolon-separated list, like
setting1=value1;setting2=value2. Normal connector use cases and functionality should not require use of these settings.