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 processing of the file or for further actions in relation to this transfer.

...

Info
titleInfo

Refer to Universal Controller documentation: Creating a Universal Event Template.

The following table shows an example of a Universal Event Template for file transfer. 

...

Field Name

Sample Value and Description

Name

b2bmft

Label

UAC User Event: UDMG transfer

Description

Event for when a file is transferred by UDMG server

Time To Live

60000

Default value for the length of time, in minutes, that the Universal Event data is valid. This value can be unspecified (null).

The Time To Live value can be overridden in the published event.

The value can be tuned depending on business or operational requirements.

Unmapped Attributes Policy

Include Attributes
Any extra attributes will be allowed and passed through as variables.

Attributes

Add the following attributes:

NameLabelType
truefilenameactual name of the file on the diskText
fullpathoriginal path of the file before the transferText
truefullpathactual path of the file on the diskText
datedate (in format AAAAMMJJ) when the transfer was executedText
sizefilesizeFloat
requestedhostidentifier of the partner who received the transfer requestText
requesterhostidentifier of the partner who requested the transferText
localhostlocal partnerText
filenameoriginal name of the file before the transferText
remotehostremote partnerText
rulerule used by the transferText
hourtime (in format HHMMSS) at the time of the execution of the transferText
transferidtransfer IDText
errormsgerror messageText
errorcodeerror codeText


The template can also be created with the Universal Template Web Services.

Expand
titleWeb Service Example


Code Block
languagebash
titleCurl Request
curl -L -X POST 'http://host_name/uc/resources/universaltemplate' \
-H 'Content-Type: application/json' -H 'Accept: application/json' \
--data-raw '{
        "attributesPolicy": "Include Attributes",
        "description": "Event for when a file is transferred by UDMG server",
        "label": "UAC User Event: UDMG transfer",
        "name": "b2bmft",
        "ttl": 60000,
        "attributes": [
            {
                "label": "actual name of the file on the disk",
                "name": "truefilename",
                "type": "Text"
            },
            {
                "label": "original path of the file before the transfer",
                "name": "fullpath",
                "type": "Text"
            },
            {
                "label": "actual path of the file on the disk",
                "name": "truefullpath",
                "type": "Text"
            },
            {
                "label": "date (in format AAAAMMJJ) when the transfer was executed",
                "name": "date",
                "type": "Text"
            },
            {
                "label": "filesize",
                "name": "size",
                "type": "Float"
            },
            {
                "label": "identifier of the partner who received the transfer request",
                "name": "requestedhost",
                "type": "Text"
            },
            {
                "label": "identifier of the partner who requested the transfer",
                "name": "requesterhost",
                "type": "Text"
            },
            {
                "label": "local partner",
                "name": "localhost",
                "type": "Text"
            },
            {
                "label": "original name of the file before the transfer",
                "name": "filename",
                "type": "Text"
            },
            {
                "label": "remote partner",
                "name": "remotehost",
                "type": "Text"
            },
            {
                "label": "rule used by the transfer",
                "name": "rule",
                "type": "Text"
            },
            {
                "label": "time (in format HHMMSS) at the time of the execution of the transfer",
                "name": "hour",
                "type": "Text"
            },
            {
                "label": "transfer ID",
                "name": "transferid",
                "type": "Text"
            }
        ]
    }
'


...

Info
titleInfo

Refer to Universal Controller documentation: Creating a Universal Event Template.

The following table shows an example of a Universal Event Template for file transfer error. 

...

The template can also be created with the Universal Template Web Services.

Expand
titleWeb Service Example


Code Block
languagebash
titleCurl Request
curl -L -X POST 'http://host_name/uc/resources/universaltemplate' \
-H 'Content-Type: application/json' -H 'Accept: application/json' \
--data-raw '{
        "attributesPolicy": "Include Attributes",
        "description": "Event for error with file transfer by UDMG server",
        "label": "UAC User Event: UDMG transfer error",
        "name": "b2bmft_error",
        "ttl": 6000,
        "attributes": [
            {
                "label": "actual name of the file on the disk",
                "name": "truefilename",
                "type": "Text"
            },
            {
                "label": "original path of the file before the transfer",
                "name": "fullpath",
                "type": "Text"
            },
            {
                "label": "actual path of the file on the disk",
                "name": "truefullpath",
                "type": "Text"
            },
            {
                "label": "date (in format AAAAMMJJ) when the transfer was executed",
                "name": "date",
                "type": "Text"
            },
            {
                "label": "filesize",
                "name": "size",
                "type": "Float"
            },
            {
                "label": "identifier of the partner who received the transfer request",
                "name": "requestedhost",
                "type": "Text"
            },
            {
                "label": "identifier of the partner who requested the transfer",
                "name": "requesterhost",
                "type": "Text"
            },
            {
                "label": "local partner",
                "name": "localhost",
                "type": "Text"
            },
            {
                "label": "original name of the file before the transfer",
                "name": "filename",
                "type": "Text"
            },
            {
                "label": "remote partner",
                "name": "remotehost",
                "type": "Text"
            },
            {
                "label": "rule used by the transfer",
                "name": "rule",
                "type": "Text"
            },
            {
                "label": "time (in format HHMMSS) at the time of the execution of the transfer",
                "name": "hour",
                "type": "Text"
            },
            {
                "label": "transfer ID",
                "name": "transferid",
                "type": "Text"
            },
            {
                "label": "error message",
                "name": "errormsg",
                "type": "Text"
            },
            {
                "label": "error code",
                "name": "errorcode",
                "type": "Text"
            }
        ]
    }
'


...

The interface with the Universal Controller is through the Universal Event Publishing Web Service.


The table below show the list of parameters that are accepted by the PUBLISHEVENT task. Except for the path, they are passed as attributes to the Universal Event.

...

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 an UDMG Rule

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

...

Configuration of Universal Monitor Task for UDMG File Transfer Event


Info
titleInfo

Refer to Creating a Universal Monitor Task

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

...

Configuration of Universal Monitor Trigger for UDMG File Transfer Event


Info
titleInfo

Refer to Creating a Universal Monitor Trigger

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

...