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:
- Add a Command Task.
- Assign the Command Task to a Pipeline Workflow.
- Ensure that Workflow Enabled is enabled for the Pipeline.
- Execute a transfer that triggers the Pipeline Workflow.
- 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.
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
| Variable | Description | Example |
|---|---|---|
TRANSFER_UUID | Unique identifier for the transfer that triggered the Command Task. | "912b05ea-361a-40cf-a848-3afd7a6d9d74" |
TRANSFER_STARTED_AT | Start timestamp of the transfer that triggered the Command Task, in RFC 3339 format. | "2026-02-03T15:04:05Z" |
PROGRESS_BYTES | Number of bytes already transferred. | "524288" |
File
| Variable | Description | Example |
|---|---|---|
FILE_PATH | Physical 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_NAME | Filename at the current processing stage (basename of FILE_PATH). | "abc123.tmp" |
DEST_FILE_PATH | Intended 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_NAME | Filename at the final destination (basename of DEST_FILE_PATH). | "data.csv" |
FILE_SIZE | File size in bytes. | "1048576" |
Virtual Path
| Variable | Description | Example |
|---|---|---|
VIRTUAL_FILE_PATH | Virtual path used by the client to send or request the file through the UDMG endpoint. | "/upload/data.csv" |
VIRTUAL_FILE_NAME | Filename from the virtual path (basename of VIRTUAL_FILE_PATH). | "data.csv" |
Pipeline and Endpoint
| Variable | Description | Example |
|---|---|---|
PIPELINE_UUID | UUID of the Pipeline whose Workflow triggered the Command Task. | "612b05ea-361a-40cf-a848-3afd7a6d9d71" |
PIPELINE_NAME | Name of the Pipeline whose Workflow triggered the Command Task. | "import-pipeline" |
ENDPOINT_SRC | Name of the Source Endpoint used by the Pipeline. | "sftp-source" |
ENDPOINT_DST | Name of the Destination Endpoint used by the Pipeline. | "local-storage" |
PROTOCOL | Transfer protocol, derived from the Endpoint type. | "SFTP" |
Session and Account
| Variable | Description | Example |
|---|---|---|
SESSION_UUID | UUID of the session associated with the transfer that triggered the Command Task. | "812b05ea-361a-40cf-a848-3afd7a6d9d73" |
SESSION_REMOTE_ADDR | Client IP address and port for the session associated with the transfer. | "192.168.1.100:54321" |
ACCOUNT_USERNAME | Login name of the Account associated with the local transfer. | "jdoe" |
DOMAIN_NAME | Name of the Domain associated with the transfer. | "production" |
DOMAIN_UUID | UUID of the Domain associated with the transfer. | "aaaabbbb-cccc-dddd-eeee-ffffffffffff" |
Error
| Variable | Description | Example |
|---|---|---|
DATA_COMPLETED | Whether 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_REASON | Reason for the transfer failure. Available only for On Error. | "Connection timeout" |
Adding a Command Task
To add a Command Task, follow these steps:
- From the Sidebar, select Configuration > Tasks.
- Click Add Task.
- Complete the details for the new Command Task, using the Field Descriptions table as a guide.
- Click Add.
Field Descriptions
The following table describes the fields that are configured for the Command Task:
| Name | Description | Specifications | Required |
|---|---|---|---|
| Name | The name of the Task. |
| Yes |
| Description | The 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. |
| 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. |
| No |
Editing a Command Task
To edit a Command Task, follow these steps:
- From the Sidebar, select Configuration > Tasks.
- Click the Name field of the Command Task you want to edit.
- Click Edit above the Command Task details.
- Edit the Command Task details, using the Field Descriptions table as a guide.
- Click Update.
Managing a Command Task
Viewing Command Task Details
To view the details of a Command Task, follow these steps:
- From the Sidebar, select Configuration > Tasks.
- 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:
| Name | Description |
|---|---|
| UUID | Universally Unique Identifier of this Task. |
| Version | Version number of the configuration. Every change increases the number. |
| Created | Date and time this Task was created. |
| Updated | Date 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:
- From the Sidebar, select Configuration > Tasks.
- Click the Name of the Command Task you want to delete.
- Click Delete above the Command Task details.
- You will be asked to confirm the deletion. Click Delete.
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.