Skip to main content
Version: 3.3

Command

A Command is a type of Task that executes a system command on the host where UDMG Server is running.

This Task type allows you to run commands or executable programs at specific points during transfer processing as part of a Pipeline Workflow.

Before You Begin

End-to-End Setup

To configure and use a Command Task as part of a Pipeline Workflow, complete the following steps:

  1. Add a Command Task.
  2. Assign the Command Task to a Pipeline Workflow.
  3. Ensure that Workflow Enabled is enabled for the Pipeline.
  4. Execute a transfer that triggers the Pipeline Workflow.
  5. Monitor the Command Task execution from the Task Instances Dashboard.

Execution Context

Command Tasks are executed on the host where UDMG Server is running and use the operating system environment available to the UDMG Server process. The command must therefore be available on the host system and executable by the user account running UDMG Server.

danger

Command Tasks execute operating system-level commands on UDMG Server and run with the same permissions as the service. Misconfiguration can lead to serious consequences, including unintended file deletion, data exposure, resource exhaustion, or disruption of active transfers.

To reduce risk:

  • Use a least-privilege approach (run the UDMG service under a restricted system account with limited file system and OS permissions) and only allow vetted, well-defined commands.
  • Prefer calling vetted scripts with predefined and controlled parameters, or use a Publish Event task to trigger a Universal Controller Workflow whenever an immediate synchronous action is not required.
  • Always test Command Tasks in a non-production environment before enabling them in production.
  • Monitor execution through logs, and promote changes through controlled environments (e.g., QA to Production).

Replacement Variables

When a Command Task runs, supported replacement variables in the Task configuration are resolved at runtime. This allows you to create dynamic commands that incorporate transfer-specific metadata and other contextual information.

The following replacement variables are available to Command Tasks using the ${VARIABLE_NAME} syntax.

Unless otherwise noted, replacement variables are available for all triggers.

Transfer

VariableDescriptionExample
TRANSFER_UUIDUnique identifier for the transfer that triggered the Command Task."912b05ea-361a-40cf-a848-3afd7a6d9d74"
TRANSFER_STARTED_ATStart timestamp of the transfer that triggered the Command Task, in RFC 3339 format."2026-02-03T15:04:05Z"
PROGRESS_BYTESNumber of bytes already transferred."524288"

File

VariableDescriptionExample
FILE_PATHPhysical path of the file at the current processing stage for the transfer that triggered the Command Task. This value may change during transfer processing."/tmp/uploads/abc123.tmp"
FILE_NAMEFilename at the current processing stage (basename of FILE_PATH)."abc123.tmp"
DEST_FILE_PATHIntended final destination path on disk for the transferred file. During On Sent, On Received, and On Error, this value identifies the intended destination. During On Staged, this is where the file is moved after staging Tasks complete."/data/inbox/data.csv"
DEST_FILE_NAMEFilename at the final destination (basename of DEST_FILE_PATH)."data.csv"
FILE_SIZEFile size in bytes."1048576"

Virtual Path

VariableDescriptionExample
VIRTUAL_FILE_PATHVirtual path used by the client to send or request the file through the UDMG endpoint."/upload/data.csv"
VIRTUAL_FILE_NAMEFilename from the virtual path (basename of VIRTUAL_FILE_PATH)."data.csv"

Pipeline and Endpoint

VariableDescriptionExample
PIPELINE_UUIDUUID of the Pipeline whose Workflow triggered the Command Task."612b05ea-361a-40cf-a848-3afd7a6d9d71"
PIPELINE_NAMEName of the Pipeline whose Workflow triggered the Command Task."import-pipeline"
ENDPOINT_SRCName of the Source Endpoint used by the Pipeline."sftp-source"
ENDPOINT_DSTName of the Destination Endpoint used by the Pipeline."local-storage"
PROTOCOLTransfer protocol, derived from the Endpoint type."SFTP"

Session and Account

VariableDescriptionExample
SESSION_UUIDUUID of the session associated with the transfer that triggered the Command Task."812b05ea-361a-40cf-a848-3afd7a6d9d73"
SESSION_REMOTE_ADDRClient IP address and port for the session associated with the transfer."192.168.1.100:54321"
ACCOUNT_USERNAMELogin name of the Account associated with the local transfer."jdoe"
DOMAIN_NAMEName of the Domain associated with the transfer."production"
DOMAIN_UUIDUUID of the Domain associated with the transfer."aaaabbbb-cccc-dddd-eeee-ffffffffffff"

Error

VariableDescriptionExample
DATA_COMPLETEDWhether the file data was fully transferred at the protocol level. This value can be true even if UDMG post-processing failed, for example, if ICAP rejected the file or a Task failed. Available only for On Error."true"
FAILURE_REASONReason for the transfer failure. Available only for On Error."Connection timeout"

Adding a Command Task

To add a Command Task, follow these steps:

  1. From the Sidebar, select Configuration > Tasks.
  2. Click Add Task.
  3. Complete the details for the new Command Task, using the Field Descriptions table as a guide.
  4. Click Add.

Field Descriptions

The following table describes the fields that are configured for the Command Task:

NameDescriptionSpecificationsRequired
NameThe name of the Task.Yes
DescriptionThe description of the Task.No
Business Service

Assigning a Business Service to this Task restricts updating, deleting, and other actions so only Users with the same Business Service can perform them (role permissions still apply).

For details, see Business Services.

  • Only Users with the System Administrator, Domain Administrator, or Pipeline Management role can assign Business Services to Tasks.
  • Select an already-created Business Service. To select it, your User must have that Business Service already assigned.
No
Type The type of Task to execute.Select Command.Yes
Timeout (Seconds)Specifies a timeout value for the Task runtime. The Task will fail if the timeout threshold is met.Default is 60 seconds.Yes
Command and Arguments

Specifies the executable and arguments to run.

For sample usage, see Examples.

Supported Replacement Variables are resolved at runtime.Yes
Runtime Directory

Specifies the directory in which the command is executed.

danger

This directory is not constrained by Domain Chroot. If configured carelessly, a Command Task can access or modify locations outside the Domain-isolated filesystem layout usually used for Local Filesystem Endpoints.

  • Must be an absolute path.
  • Supported Replacement Variables and relative paths in arguments are resolved from this location.
No

Editing a Command Task

To edit a Command Task, follow these steps:

  1. From the Sidebar, select Configuration > Tasks.
  2. Click the Name field of the Command Task you want to edit.
  3. Click Edit above the Command Task details.
  4. Edit the Command Task details, using the Field Descriptions table as a guide.
  5. Click Update.

Managing a Command Task

Viewing Command Task Details

To view the details of a Command Task, follow these steps:

  1. From the Sidebar, select Configuration > Tasks.
  2. Click the Name of the Command Task you want to view.

Command Task Metadata

Command Task details include all parameters given in the Field Descriptions table, plus the following read-only metadata:

NameDescription
UUIDUniversally Unique Identifier of this Task.
VersionVersion number of the configuration. Every change increases the number.
CreatedDate and time this Task was created.
UpdatedDate and time this Task was last updated.

Assigning a Command Task to a Pipeline

Command Tasks are not executed independently. A Command Task runs only when it is assigned to a Pipeline Workflow and Workflows are enabled on the Pipeline.

The Pipeline Workflow defines when a Command Task is executed (triggered) during the transfer lifecycle. A Command Task can be referenced by multiple Pipelines and may be used in different Workflow triggers.

For more details, see Assigning a Task to a Pipeline.

Monitoring Executed Tasks

Each Task execution is recorded as a Task Instance, which includes execution details such as status.

Task Instances can be reviewed on the Task Instances Dashboard for monitoring, troubleshooting, and auditing.

Deleting a Command Task

To delete a Command Task, follow these steps:

  1. From the Sidebar, select Configuration > Tasks.
  2. Click the Name of the Command Task you want to delete.
  3. Click Delete above the Command Task details.
  4. You will be asked to confirm the deletion. Click Delete.
warning

UDMG prevents the deletion of a Configuration Item if it is currently referenced by another Configuration Item (i.e., Pipeline). The Configuration Item must be edited or the reference removed before you can delete the Task. Deletion cannot be undone.