UAC - UDM Gateway Tasks
Overview
For integration of WLA / Job Scheduling with the UDM Gateway File Transfer solution. Universal Controller customers can implement the provided Universal Task.
- Universal Task (requires Universal Controller version 6.7.0.0 or higher).
- Uses the UDM Gateway Rest API (requires UDM Gateway Version 11 or higher).
- Requires Python 3.6 or higher with the requests module installed. Tested with the Universal Agent bundled Python distribution.
- Stdout returns information from the UDM Gateway. Stderr is used for messages from the Universal Task / Script itself.
- You can set different log-levels, providing you more or less information to suit your needs.
The Universal Task can automate the following UDM Gateway functions:
- PGP Encrypt
- PGP Decrypt
- Run a UDM Gateway Trigger
- SFTP File Upload
- SFTP File Download
- Trading Partner File Upload
- Trading Partner File Download
- Trading Partner File Upload using a Regex or Generic Filename Pattern
- Trading Partner File Download using a Regex or Generic Filename Pattern
The Universal Task performs the following:
- Login to UDM Gateway Server
- Check UDM Gateway Server Version
- Create Temporary UDM Gateway Trigger with a unique name to perform the desired action. Except Run Trigger which copies the existing trigger to the temporary trigger.
- Run Temporary UDM Gateway Trigger.
- Get Temporary UDM Gateway Trigger Status
- Delete Temp Trigger
- Retrieve Trigger Log
- Close UDM Gateway Session
Example Output
Universal Task Details Fields
Function = PGP Encrypt
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the PGP Encrypt Function | Y | |
Encrypted File Name | The name of the target encrypted file | /demo/my-data.pgp | Y |
Plain Text File Name | The name of the source plaintext file | /demo/my-data.txt | Y |
PGP Key | PGP Key to use for encryption | secret: LocalDemo <stonebranch.demo@stonebranch.com> | Y |
Delete Source File | Specify if the source plaintext file is deleted | Y | |
Compress | Specify if the target encrypted file is compressed | Y | |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |
Function = PGP Decrypt
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the PGP Decrypt Function | Y | |
Encrypted File Name | The name of the target encrypted file | /demo/my-data.pgp | Y |
Plain Text File Name | The name of the source plaintext file | /demo/my-data.txt | Y |
PGP Key | PGP Key to use for encryption | secret: LocalDemo <stonebranch.demo@stonebranch.com> | Y |
Delete Source File | Specify if the source plaintext file is deleted | Y | |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |
Function = Run Trigger
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the Run Trigger Function | Y | |
Trigger Name | Provide the name of an existing UDMG Trigger | Test Trigger | Y |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |
Function = SFTP Upload
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the SFTP Upload Function | Y | |
SFTP Host | Remote SFTP server Host Name or IP | 127.0.0.1 | Y |
SFTP Port | Remote SFTP server port | 22 | N |
SFTP Credential | Select the Credential Definition to access the remote SFTP server | Y | |
Local File Name | Location of the Local File | /demo/my-data.pgp | Y |
Remote Directory | Remote SFTP Server Directory | / | Y |
Transfer Mode | Transfer Mode (Ascii, Binary, Auto) | Ascii | N |
Overwrite if File Exists | Overwrite destination file(s) if it exists | N | |
Retry Limit | Maximum Retry Attempts | 0 | N |
Retry Interval | Interval in Seconds Between Retries | 60 | N |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |
Function = SFTP Download
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the SFTP Download Function | Y | |
SFTP Host | Remote SFTP server Host Name or IP | 127.0.0.1 | Y |
SFTP Port | Remote SFTP server port | 22 | N |
SFTP Credential | Select the Credential Definition to access the remote SFTP server | Y | |
Local File Name | Location of the Local File | /demo/my-data.pgp | Y |
Remote File Name | Remote SFTP File | /my-data.pgp | Y |
Transfer Mode | Transfer Mode (Ascii, Binary, Auto) | Ascii | N |
Retry Limit | Maximum Retry Attempts | 0 | N |
Retry Interval | Interval in Seconds Between Retries | 60 | N |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |
Function = Trading Partner Upload
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the Trading Partner Upload Function | Y | |
Trading Partner | UDM Gateway Trading Partner definition | Customer A | Y |
Local File Name | Location of the Local File | /demo/my-data.pgp | Y |
Remote Directory | Remote Trading Partner Directory | / | Y |
Transfer Mode | Transfer Mode (Ascii, Binary, Auto) | Ascii | N |
Passive Mode | Passive Mode (true, false) | N | |
Retry Limit | Maximum Retry Attempts | 0 | N |
Retry Interval | Interval in Seconds Between Retries | 60 | N |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |
Function = Trading Partner Download
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the Trading Partner Download Function | Y | |
Trading Partner | UDM Gateway Trading Partner definition | Customer A | Y |
Local File Name | Location of the Local File | /demo/my-data.pgp | Y |
Remote File Name | Remote Trading Partner File | /my-data.pgp | Y |
Transfer Mode | Transfer Mode (Ascii, Binary, Auto) | Ascii | N |
Passive Mode | Passive Mode (true, false) | N | |
Retry Limit | Maximum Retry Attempts | 0 | N |
Retry Interval | Interval in Seconds Between Retries | 60 | N |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |
Function = Trading Partner RegEx Upload
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the Trading Partner RegEx Upload Function | Y | |
Trading Partner | UDM Gateway Trading Partner definition | Customer A | Y |
Regular Expression / Wildcard | Specify the Regular Expression or Wildcard | *.txt | N |
Expression Type | Select either "Regular Expression" or "Widlcard" | Y | |
Local Directory | Location of the Local File | /demo | Y |
Remote Directory | Remote Trading Partner Directory | / | Y |
Transfer Mode | Transfer Mode (Ascii, Binary, Auto) | Ascii | N |
Passive Mode | Passive Mode (true, false) | N | |
Fail if No Files Found | Specify whether the task should fail if no files match the specified expression (Regular Expression or Wildcard) | N | |
Delete on Success | Specify whether files should be deleted after successful transfer | N | |
Retry Limit | Maximum Retry Attempts | 0 | N |
Retry Interval | Interval in Seconds Between Retries | 60 | N |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |
Function = Trading Partner RegEx Download
Field Label | Description | Example | Required |
---|---|---|---|
UDM Gateway Server | Specify the URL for the UDM Gateway Server | Y | |
UDM Gateway Credential | Select the Credential Definition to access the UDM Gateway Server | Y | |
UDM Gateway Domain | UDM Gateway Server Domain | Local | Y |
Function | Select the Trading Partner RegEx Download Function | Y | |
Trading Partner | UDM Gateway Trading Partner definition | Customer A | Y |
Regular Expression / Wildcard | Specify the Regular Expression or Wildcard | *.txt | Y |
Expression Type | Select either "Regular Expression" or "Widlcard" | Y | |
Local Directory | Location of the Local File | /demo | Y |
Remote Directory | Remote Trading Partner Directory | / | Y |
Transfer Mode | Transfer Mode (Ascii, Binary, Auto) | Ascii | N |
Passive Mode | Passive Mode (true, false) | N | |
Fail if No Files Found | Specify whether the task should fail if no files match the specified expression (Regular Expression or Wildcard) | N | |
Delete on Success | Specify whether files should be deleted after successful transfer | N | |
Retry Limit | Maximum Retry Attempts | 0 | N |
Retry Interval | Interval in Seconds Between Retries | 60 | N |
Logging Level | Controls messages issues from the Universal Task Script
| None | Y |