Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each time a file transfer action occurs on the UDMG Server a Universal Event can be generated. This event can be used to trigger a Universal Monitor Task for the file processing of the file or for further actions in relation to concerning this transfer.

The event can be published before, after, or in case of an error for a file transfer.

  • "Before a file transfer" , means during the initialization phase of the transfer, before the data transmission of the file content is happeninghappens.
  • "After a file transfer" , means after the successful completion of the transfer.
  • "In case of error" , means when a transfer has failed, the error details can be added to the event attributes.

...

Info
titleRecommendation

Configure events for successful and error conditions. 


Creating a Universal Event Template for UDMG File Transfer

...

Parameter

Description

path

Path to the Universal Controller API configuration file.

Note
titleNote

This parameter is not passed as an event attribute.


Warning
titleWarning

For Windows path, the '\' character must be escaped as '\\'.
For example, instead of "C:\DATA\UDMG", input "C:\\DATA\\UDMG"


ruleThe rule used by the transfer.
dateThe date (in format AAAAMMJJ) when the transfer task was executed.
hourThe time (in format HHMMSS) at the time of the execution of the transfer task.
filesizeFile size (as string).
inpathThe path to the receiving folder for the current transfer. This path depends on the configuration (folder for sending the rule, the server, or the Gateway depending on the case).

outpath

The path to the receiving folder for the current transfer. This path depends on the configuration (folder for sending the rule, the server, or the Gateway depending on the case).
trueFullPath

The actual path of the file on the disk.

trueFilenameThe actual name of the file on the disk.
fullPathThe original path of the file before the transfer.
filenameThe original name of the file before the transfer.
remoteHostThe identifier of the remote partner.
localHostThe identifier of the local partner.
transferIDThe transfer ID.
requesterHostThe identifier of the partner who requested the transfer.
requestedHostThe identifier of the partner who received the transfer request.
sizeFile size (as number).
errorcodeError Code (only for error situationsituations).
errormsgError Message (only for error situationsituations).

Universal Controller API Configuration Files

The configuration file is set at the task level and specifies that the Universal Event Template and the Universal Control URL to use are used for the publishing of the event.

Being a parameter of the PUBLISHEVENT task, it can be different for each transfer rule and each use of the task. This allows to use the usage of different Universal Event Template Templates for successful (for example b2bmft) and failed (for example b2bmft_error) file transfers.

...

To send an event after the completion of the file transfer, the rule that is associated with the transfer must have the PUBLISHEVENT task in the list of Post-Tasks. It is enough to have only this task.

Note
titleNote

The configuration for Pre-Task, Post-Task, and Error-Task is now under the Rule tab  tab.



Expand
titleExample of rule post-tasks configuration


Code Block
languagejs
titlePost-Tasks
[
    {
        "type": "PUBLISHEVENT",
        "args": {
            "path": "/data/rules.ini",
            "rule": "#RULE#",
            "date": "#DATE#",
            "hour": "#HOUR#",
            "filename": "#ORIGINALFILENAME#",
            "filesize": "#FILESIZE#",
            "fullPath": "#ORIGINALFULLPATH#",
            "localHost": "#LOCALHOST#",
            "remoteHost": "#REMOTEHOST#",
            "requestedHost": "#REQUESTEDHOST#",
            "requesterHost": "#REQUESTERHOST#",
            "size": "#FILESIZE#",
            "transferID": "#TRANSFERID#",
            "trueFilename": "#TRUEFILENAME#",
            "trueFullPath": "#TRUEFULLPATH#",
            "errorCode": "#ERRORCODE#",
            "errorMsg": "#ERRORMSG#"
        }
    }
]


Configuration of an Error Task for

...

a UDMG Rule

To send an event after an error occurred during a the file transfer, the rule that is associated with the transfer must have the PUBLISHEVENT task in the list of Error Tasks. It is enough to have only this task.

Note
titleNote

The configuration for Pre-Task, Post-Task, and Error-Task is now under the Rule tab  tab. 


Expand
titleExample of rule error tasks configuration


Code Block
languagejs
titleError Tasks
[
    {
        "type": "PUBLISHEVENT",
        "args": {
            "path": "/data/rules.ini",
            "rule": "#RULE#",
            "date": "#DATE#",
            "hour": "#HOUR#",
            "filename": "#ORIGINALFILENAME#",
            "filesize": "#FILESIZE#",
            "fullPath": "#ORIGINALFULLPATH#",
            "localHost": "#LOCALHOST#",
            "remoteHost": "#REMOTEHOST#",
            "requestedHost": "#REQUESTEDHOST#",
            "requesterHost": "#REQUESTERHOST#",
            "size": "#FILESIZE#",
            "transferID": "#TRANSFERID#",
            "trueFilename": "#TRUEFILENAME#",
            "trueFullPath": "#TRUEFULLPATH#"
        }
    }
]


...

Info
titleInfo

Refer to Creating a Universal Monitor Task.

Create a Universal Monitor task and select the Universal Event Template that was created for UDMG File Transfer.

Additional criteria can be selected to filter the event , by using the event attributes (which contain the file transfer metadata from UDMG). For example, the file transfer direction can be inferred from the transfer rule name, provided that a consistent naming convention is in placeused.


Configuration of Universal Monitor Trigger for UDMG File Transfer Event

...

Info
titleInfo

Refer to Creating a Universal Monitor Trigger.

Create a Universal Monitor Trigger and select the Universal Monitor Task that was created to filter the events to be caught.

Select one or more task tasks to be triggered for each event. The event attributes of the event are passed as variables to the tasks, which thus can then retrieve the details of the file transfer. 

The variable name is formed as using ops_trigger + universal template name + event attribute name. For example, for example  ops_trigger_b2bmft_filesize for the filesize attribute.

...