MFT Enterprise Processing Rules

MFT Enterprise Processing Rules enable you to automate specific actions to files that were uploaded or downloaded by external or internal users to specific virtual folders. These actions are based on specific conditions that you define for each rule, such as filename, size, or user. After (or before for download) an external or internal user uploads or downloads a file from the Hub, it is processed based on defined rules such as moving the file to another location and sending alert email messages.

The following is a of actions that you can automate after a file is uploaded or downloaded by external or internal users:

  • Run anti-virus for each file that arrives and delete it if the scan fails.

  • Run a job that transfers a file that arrives from the Hub to a specific server.

  • Copy all files that appear in Folder1/incoming to a backup directory on the network.

  • Encrypt the file when it is uploaded and decrypt it when it is downloaded.

You can add a rule based on the following rule types:

  • Upload file by external user: The rule is processed after the file is uploaded by an external user.

  • Download file by external user: The rule is processed before or after the file is downloaded by an external user.

  • Push file by internal user: The rule is processed after the file is uploaded by an internal user.

  • Pull file by internal user: The rule is processed before or after the file is downloaded by an internal user.

The following diagram shows how MFT Enterprise handles processing rules for uploaded or downloaded files by internal or external users.

Creating an MFT Enterprise Processing Rule

This procedure describes how to create an MFT Enterprise processing rule.

Before You Begin

Ensure that you have completed all the setup procedures, as described in Setting up the Control-M MFT Enterprise Environment.

Begin

  1. From the Managed File Transfer domain, select MFT Enterprise Configuration.

    If the button is disabled, you need to install Control-M MFT Enterprise, as described in Control-M MFT Enterprise Installation.

  2. Log in with the same username and password that you used to log in to Control-M Web.

    The MFT Enterprise window appears.

  3. Select the Rules tab, and then click Add Rule and selection one of the following:

    • Upload file by external user

    • Download file by external user

    • Push file by internal user

    • Pull file by internal user

  4. Do the following:

    1. In the Name field, type the name of the rule.

      Valid characters: A-Z, a-z, 0-9, space or !#()`.-"_@ characters

    2. In the Description field, describe the purpose the rule.

    3. From the Priority drop-down list, select the priority level for this rule.

      If you select a higher priority level, this rule will be processed before other matching rules. 1-Highest, 10-Lowest.

  5. Click the Conditions tab, click Add Condition, and then select one of the following:

    • By file name

    • By file size

    • By user/company

    • By folder

  6. Apply the condition criteria, as described in Control-M MFT Enterprise Rule Conditions.

  7. Click the Actions tab, click Add Action, and then select one of the following:

    • Notify by email

    • File operations

    • Run folder/job

    • Add event

    • Run command/script

  8. Apply the action criteria, as described in Control-M MFT Enterprise Rule Actions.

  9. Click Save.

Control-M MFT Enterprise Rule Conditions

The following table describes the Control-M MFT Enterprise conditions that you can apply for each rule.

Parameter

Description

If file name matches a pattern

Determines whether the file matches a specific filename, a regular expression, or if it is case sensitive.

AAA.txt,B*.pdf,C???.csv

If file matches a certain size

Determines the minimum and maximum file size in bytes, KB, MB, or GB.

If file sent by specific user/groups or company

Determines which users or companies sent the file.

If file arrives in specific virtual folder

Determines which virtual folders and subdirectories external and internal users can upload or download files to and from.

Control-M MFT Enterprise Rule Actions

The following table describes the Control-M MFT Enterprise actions that you can apply for each rule.

You can also use variables for each parameter, as described in Action Rule Variables.

Parameter

Description

Notify by email

Defines the email address, subject, and message of the notification. It also determines whether to cancel processing all rules, cancel processing this rule, delete the file, or continue processing rules if the action fails.

File operations

Determines whether to move or copy the file the file to a relative or absolute path and whether to rename the destination file or delete it. It also determines whether to cancel processing all rules, cancel processing this rule, delete the file, or continue processing rules if the action fails.

If you use Action Rule Variables and you want the variables to update the filename and path of the copied file, select Adjust $$ variables to the copied file.

A rule action copies a file from /folder1/file1.txt to /p/myfiles/file2.txt and you checked the Adjust $$ variables to the copied file option, the following occurs:

  • $$FILE_PATH$$ changes to /p/myfiles

  • $$FILE_NAME$$ changes to file2.txt

Future actions that use $$FILE_PATH$$ and $$FILE_NAME$$ are performed on the file copy, and not on the original file that was uploaded.

Run folder/job

Determines which folder and jobs to run with run options and variables. It also determines whether to cancel processing all rules, cancel processing this rule, delete the file, or continue processing rules if the action fails.

Add event

Determines the event name and event date to add, which triggers jobs that are waiting for this event to start executing. It also determines whether to cancel processing all rules, cancel processing this rule, delete the file, or continue processing rules if the action fails.

Run command script

Defines the executable command or script to run with successful return codes. It also determines whether to cancel processing all rules, cancel processing this rule, delete the file, or continue processing rules if the action fails.

Do not change the file name (by renaming or moving) if one of the other matching rules is expected to use this file.

Action Rule Variables

The following table describes the variables that you can use as values for actions in a rule.

Variable

Description

$$FILE_PATH$$

Defines the path of the file.

\b2bhome\Folder1\incoming\aaa.txt

$$FILE_ABS_PATH$$

Defines the absolute path of the file.

C:\Agent\cm\AFT\ftshome\b2bhome\Folder1\incoming\aaa.txt

$$FILE_DIR$$

Defines the parent directory of the file.

\b2bhome\Folder1\incoming

$$FILE_ABS_DIR$$

Defines the absolute parent directory path of the file.

C:\Agent\cm\AFT\ftshome\b2bhome\Folder1\incoming

$$FILE_NAME$$

Defines the name of the file.

aaa.txt

$$FILE_NAME_NO_EXT$$

Defines the name of the file without an extension

$$FILE_EXT$$

Determines the file extension (including the "." character).

$$FILE_EXT_NO_DOT$$

Determines the file extension (without the "." character).

$$FILE_DATE$$

Defines the date of the file in YYYYMMDD format in UTC time.

20180325

$$FILE_DATE_LOCAL$$

Defines the date of the file in YYYYMMDD format in the local time of the Agent host.

$$FILE_TIME$$

Defines the time of the file in HHmmSS format in UTC time.

170459

$$FILE_TIME_LOCAL$$

Defines the time of the file in HHmmSS format in the local time of the Agent host.

$$FILE_SIZE$$

Determines the size of the file in bytes

$$USER$$

Determines which users uploaded the file.

$$COMPANY$$

Determines which company uploaded the file.

$$VIRTUAL_FOLDER$$

Defines the virtual folder name

$$EMAIL$$

Defines the user email address.

user1@company1.com

$$PHONE_NUMBER$$

Defines the user phone number.

704123456

$$SUB_DIR_PATH$$

Defines the destination subdirectory path of the file.

Sub1/Sub2

$$STAGING_FILE_NAME$$

Defines the temporary name of the file in the staging area, before a download operation starts. You can use this variable to perform operations on the temporary file, before the user downloads it.

$$STAGING_FILE_PATH$$

Defines the temporary file path of the file in the staging area, before a download operation starts. You can use this variable to perform operations on the temporary file, before the user downloads it.