Configure Preset Actions and Email Notifications using a Job Template

You can use a Job template to configure one or more preset actions that will always run before any actions configured by Gateway Administrator users. You can also use templates to provide preconfigured email notifications for Job success and failure notifications.

For example, you could create a template to transfer all files to a designated location, then screen these files for viruses. Any failure in this process will send a failure notification to an administrator whose email is configured in the template.

Actions that have been configured using a Job template are visible in the New/Edit Job page under Preset Actions. (This section is visible only when a Job template is configured.) Gateway Administrator users can view the details of these actions, but cannot make changes.

Before you begin

  • Have a Windows administrator account on the computer running the Reflection Gateway Administrator service.

    Creating or editing a Job template requires write access to the files in the Reflection Gateway installation folder.

  • Confirm that all servers required for your preset actions have been added to Gateway Administrator.

    The Reflection Gateway Administrator service will fail to start if a Job template is in place that uses servers that haven’t been added.

  • Test your Job actions using the Gateway Administrator New/Edit Job page.

    This is not required, but is recommended. Any change you make to an action in a Job template requires a restart of the Reflection Gateway Administrator service before it can be tested.

To configure preset actions using a Job template

  1. Navigate to Gateway Administrator conf folder. The default location is:

    C:\Program Files\Micro Focus\ReflectionGateway\GatewayAdministrator\conf

  2. Create a copy of jobTemplate.xml.example and open it in a text editor.

    The template file is an XML file. The example file shows sample data for a Job that includes a transfer action followed by a command action.

  3. Edit the file. You can delete elements you don’t want to pre-configure, and edit or add elements as needed. For example:

    • In the TransferAction and CommandAction elements, change “targetSever” to your actual server name(s).

      NOTE:The Reflection Gateway Administrator service will fail to start if jobTemplate.xml specifies invalid servers.

    • In the CommandAction element, replace the sample command.

    • Add or delete TransferAction and CommandAction elements as needed.

    • Enter correct email addresses for SuccessAction or FailureAction, or delete these elements. Setting these values in the template configures read-only values for the To: field in email notification messages. The Cc: field remains editable, so users creating Jobs can configure email notification to their own email address. If you delete the SuccessAction or FailureAction elements from the template, there will be no default failure and success notifications, and users will be able to configure all fields.

  4. Save the file as jobTemplate.xml and put it in Gateway Administrator conf folder.

    Restart the Reflection Gateway Administrator service and wait until the server.log shows the message “Server container started.”

  5. Log in to Gateway Administrator and create a new Job to confirm your template settings:

    • If your template includes TransferAction or CommandAction elements, you’ll see a Preset Actions section with that shows your template actions. These can be viewed but not edited.

    • If your template includes SuccessAction or FailureAction, all fields except the Cc; field will be preconfigured and read-only.