Axway Gateway: Managing Events

Decision Rule usage example: Scheduling

Task overview

Example production environment

Configuring the function

Results

Task overview

This topic provides an example of how to configure Gateway to trigger a specific processing task at a pre-scheduled time each week.

To configure Gateway to retrieve a file from a remote machine at pre-scheduled dates and times, perform the following tasks:

Example production environment

Operation

A company uses an accounting application that requires an expense report that is stored on a remote machine. The expense report is available every Monday at 3 p.m., except during the month of December.

Architecture

In this example:

  • The accounting software and Gateway reside on the same UNIX host.
  • The expense report directory resides on a machine with hostname SiteA. SiteA also hosts an Axway Transfer product.

The following figure illustrates the architecture of the example.

Configuring the function

Prerequisites

  • Gateway must be correctly installed and running on the same platform as the accounting application.
  • Axway Transfer must be correctly installed and running on the Remote SiteA machine.
  • You must have created the local and remote Sites necessary for Transfer Request from Gateway to Axway Transfer. This example uses the following site aliases:
    • Gateway local site alias = GW_1
    • Remote machine alias = Remote_SiteA
  • The machines must be linked by a TCP/IP connection.
  • You require a Windows environment to support the Gateway GUI.

Creating the execution Model

In this example, we will create a Decision Rule that specifies a Model as the execution type when a stored file is detected.

To create a new General Model to retrieve a file from a remote server:

  1. In the Directory tree structure, click to expand the nodes:
    Transfer Management > Parameters > Model
  2. Right-click the Transfer Model sub-node, then select New from the context menu to display the New Transfer Model window.
  3. Complete the following fields of the New Transfer Model window:
    • In the Name field, enter M_Retrieve_Report.
    • In the Protocol field, select General.
    • Use the Argument and Value fields to assign the following values:
    • Argument Value

      type

      TRANS

      direction

      I (input)

      mode

      I (initiator)

      file name

      report.txt

      file component

      report.txt

      application

      DEFAULT_B

      originator alias

      REMOTE_SITEA

      destination alias

      GW_1

  4. Click OK to validate the values.
    Gateway closes the New General Model window and adds an entry representing the new Model to the General Models list in the General Model display pane.

Creating the Scheduling-type Decision Rule

To create a Decision Rule for a scheduled task:

  1. In the left pane of the GUI main window, click to expand the Event Management node.
    Gateway expands the node to display the following four sub-nodes:
    • Scheduling
    • Directory Scanning
    • Transfer Change State
    • XMS
  2. Right-click the Scheduling sub-node. A context menu appears. Select New > Decision Rule
    Gateway displays a New Decision Rule window.
  3. In the New Decision Rule window, enter the following data:
  4. In the section... Field Enter the value... Description

    Top

    Name

    Retrieve_Report

    Unique name for the Decision Rule.

    Active

    Click the check box.

    Activates the Decision Rule.

    Conditions

    No conditions.

    Processing (if all conditions match)

    Execution type

    Model

    Execute a Model in the case of a match for this Decision Rule.

    Model

    M_Retrieve_Report

    Name of the Model to execute.

  5. After entering the values, click OK.

Creating the Scheduling-type Rule Table

For this example we create a Scheduling-type Rule Table, linking the Decision Rule that we created in the previous section.

To create a Scheduling-type Rule Table, follow these steps:

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

    Name

    Retrieve_file_test

    Unique name for the Rule Table.

    Comments

    Table for scheduled file retrieval test

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

    Exclusive table

    Click the check box to indicate yes

    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.

  5. In the Scheduling tab of the New Rule Table window click New.
    Gateway opens the Scheduling calendar window.
    • Use the fields in the Selected Date and Selected Hour sections to set a time and date for repeated triggering of a task. We want to trigger at 3 p.m. on all Mondays, excluding Mondays during the month of December.
    • In the Selected Date section, click the lower radio button, then click the lower text box and select add from the drop-down list.
      • Gateway displays a new text box to the right of the first box. Click the newly displayed text box and select all from the drop-down list.
      • Gateway displays a new text box to the right of the second box. Click the newly displayed text box and select monday from the drop-down list.
      • Gateway displays a new text box to the right of the third box. Click the newly displayed text box and select the period (.) from the drop-down list. Reading the boxes from left to right, the boxes should now display: add all monday.
      • Click Add. Gateway adds the add all monday date set to the list of triggering dates in the Date frame.
    • In the text box of the Selected Hour section, enter 15H00. Then click Add. Gateway adds the 15:00 (3 p.m.) time to the list of triggering times in the Date frame.
    • In the Selected Date section, click the lower radio button, then click the lower text box and select remove from the drop-down list.
      • Gateway displays a new text box to the right of the first box. Click the newly displayed text box and select all from the drop-down list.
      • Gateway displays a new text box to the right of the second box. Click the newly displayed text box and select monday from the drop-down list.
      • Gateway displays a new text box to the right of the third box. Click the newly displayed text box and select of december from the drop-down list.
      • Gateway displays a new text box to the right of the forth box. Click the newly displayed text box and select the period (.) from the drop-down list. Reading the boxes from left to right, the boxes should now display: remove all monday of december.
      • Click Add. Gateway adds the remove all monday of december date set to the list of triggering dates in the Date frame.
      • Click OK at the bottom of the calendar window to accept the schedule and return to the Scheduling tab. This tab now displays your scheduled dates and time, labeled as Calendar #1.
  6. In the Linked Rules tab of the New Rule Table window, in the Available Rules list click Retrieve_Report to select it. Then click the Link button.
    Gateway links the Retrieve Report Decision Rule to the Retrieve_file_test Rule Table.
  7. Click OK to validate the new Rule Table.
    Gateway closes the New Rule Table window and adds the Retrieve_file_test entry to the display of Rule Tables and Decision Rules for the Scheduling category.

Results

When you have created and activated the Retrieve_file_test Decision Rule and linked it to the Retrieve_file_test Rule Table as described above, Gateway triggers the retrieval of the report.txt file from Remote SiteA at 3 p.m. on the scheduled dates.

 

Links to documentation set for Axway Gateway 6.17.3:

Related Links