Axway Gateway: Managing Events

Decision Rule usage example: Routing

Model-based routing via the GUI

Configuring Gateway for routing

Results

Model-based routing via the GUI

This topic provides an example of how to specify the routing behavior of Gateway.

The example describes how to use the GUI to route a file from an Axway Transfer product to an FTP client via Gateway, using a Decision Rule that applies a Model as the execution type.

The resulting series of processes is summarized by the following schema:

Configuring Gateway for routing

To configure your Gateway for routing you execute the following main tasks:

The following sections provide details about how to accomplish these tasks.

Creating Local and Remote Sites

Create the following Sites:

  • In Gateway:
    • Local Site = GATEWAY
    • Remote Site = TRANSFER
    • FTP Template Site = TFTP
  • In Axway Transfer:
    • Local Site = TRANSFER
    • Remote Site = GATEWAY

Creating the execution Model

In this example, the Decision Rule specifies a Model as the execution type for the received Transfer. Create a General Model and, optionally, a corresponding Protocol Model with the same name. The General Model is mandatory for routing, because you can only define the Transfer destination in the General Model and not in a Protocol Model. For more information, refer to About Models.

  1. Create a General Model with the following properties:
    • Model name: MODEL_FTP
    • Protocol: GENERAL
    • Destination alias: TFTP
  2. Create a Protocol Model with the following properties:
    • Model name: MODEL_FTP
    • Protocol: FTP
    • Destination: FTPCLIENT
    • File component: '&(dir_path)/&(file_component)'
    • Application name: ‘&(appli)’

The file component and application parameters are mandatory. You can define these parameters in either the General or the Protocol Model. In this example, the definition uses symbolic variables (&(appli)) to retrieve the corresponding parameter values from the incoming Transfer. Using symbolic variables not only simplifies the definition but guarantees transfer coherence.

Creating the Decision Rule

To define a Decision Rule that applies Model-based routing, create a Transfer Change State type Decision Rule as follows:

  1. In the left pane of the GUI main window, click to expand the Event Management node.
  2. Gateway expands the node to display the following four sub-nodes:
    • Scheduling
    • Directory Scanning
    • Transfer Change State
    • XMS
  3. Each sub-node represents a Decision Rule/Rule Table category.
  4. Right-click the Transfer Change State sub-node. A context menu appears. Select New > Decision Rule.
  5. Gateway displays a New Decision Rule window.
  6. In the New Decision Rule window, enter the following data.
  7. For the parameter/ condition...

    Enter the value...

    Description

    Name

    Rule1

    Unique name for the Decision Rule.

    Active

    Click the check box

    Activates the Decision Rule.

    Comments

    (optional descriptive text)

    Free text description of the Decision Rule. Enter up to 80 alphanumeric characters.

    This description appears in the comment column of the Decision Rule list display pane.

    Conditions

    1st condition

    protocol = PeSIT

    The protocol used in the incoming Transfer must be PeSIT.

    2nd condition

    destination#&(originator)

    The destination must be different from the originator Site in the incoming Transfer.

    3rd condition

    rec_len[ ]150,3000

    The record length must be greater than or equal to 150 and less than or equal to 3000.

    4th condition

    direction = I

    The direction must be Input.

    Specifying the direction parameter prevents the Decision Rule from looping on input and output Transfers.

    5th condition

    file_size ][ 10,50

    The file size must not be between the values 10 and 50.

    6th condition

    state = ended

    The state of the incoming Transfer is ended

    Processing (if all conditions match)

    Execution type

    Model

    Execute Model-based routing on output.

    Model

    MODEL_FTP

    Name of the Model to use to execute routing.

    This Model name must correspond to the name of a General Model and can optionally correspond to a Protocol Model name. The General Model must include the destination_alias parameter. Either the Protocol or the General Model must include the following parameters:

    • file_component
    • appli

    Link input and output transfers

    Click the check box

    Creates a logical link between the incoming and the outgoing Transfers.

  8. When you have finished entering the values, click OK to accept.

Creating the Rule Table

To use an existing Decision Rule, you link the Decision Rule to a Rule Table. For this example we create a Transfer Change State-type Rule Table and link the Rule1 Decision Rule that we created in the previous section.

Create a Transfer Change State type Rule Table as follows:

  1. In the left pane of the GUI main window, click to expand the Event Management node.
  2. Gateway expands the node to display the following four sub-nodes:
    • Scheduling
    • Directory Scanning
    • Transfer Change State
    • XMS
  3. Each sub-node represents a Decision Rule/Rule Table category.
  4. Right-click the Transfer Change State sub-node. A context menu appears.  Select New > Rule Table.
  5. Gateway displays a New Rule Table window.
  6. In the General tab of the New Rule Table window, enter the following data:
  7. Field

    Enter the value...

    Description

    Name

    ROUTING1

    Unique name for the Rule Table.

    Comments

    (optional descriptive text)

    Free text description of the Rule Table.
    Maximum: 80 alphanumeric characters.

    Exclusive table

    Click the check box

    Executes only the first Decision Rule that completely matches the criteria.

    Default execution type

    No action

    Specifies that no action is executed if no defined Decision Rule matches the current parameters.

    Log level

    None

    Deactivate logging.

  8. In the Event tab of the New Rule Table window, do not change the defaults (no processing restrictions).
  9. In the Linked Rules tab of the New Rule Table window click Rule1 in the available rules list to select it. Then click the Link button.
  10. Gateway links the Rule1 Decision Rule to the Routing1 Rule Table.
  11. Click OK to validate the new Rule Table.
  12. Gateway closes the New Rule Table window and adds the Routing1 entry to the display of Rule Tables and Decision Rules for Transfer Change State category.

Results

Once you have created and activated the Decision Rule and linked it to a Rule Table, the supervisor component of Gateway monitors gateway activity, analyzing incoming transfers for matches to the Decision Rule.

Incoming Transfer match

Suppose that Gateway receives an incoming transfer with the following parameter values.

  • Direction: 'I' (incoming)
  • Application: 'APPLI'
  • Destination: GATEWAY
  • Originator: TRANSFER
  • Protocol: 'PeSIT'
  • Record length: 1024
  • File component: file.txt
  • File size: 147
  • State: Ended

Gateway checks the parameters of the incoming Transfer against the conditions set in the Rule1 Decision Rule.

  • Condition 1: protocol is PeSIT
  • Condition 2: destination (Gateway) is not the same as the originator (Axway Transfer)
  • Condition 3: record length is between 150 and 3000
  • Condition 4: direction is incoming
  • Condition 5: file size is not between 10 and 50
  • Condition 6: the incoming file transfer is complete and passed to the ended state

Routing result

Since the six conditions specified in the Rule1 Decision Rule match the parameters of the incoming Transfer, Gateway applies the Model MODEL_FTP definition. After receiving the file from Axway Transfer, Gateway immediately deposits a new Transfer Request and makes the file available to the FTP client.

 

Links to documentation set for Axway Gateway 6.17.3:

Related Links