Configure XML File Action (datrg1225m000)

Use this session to enter the settings for XML files to be created by a trigger.

This session is started via the Configure Actions... command in the session (if Action Template = Create XML File).

To configure an XML file action:

  1. Specify the action settings by filling in the fields in this dialog. You must specify directory paths, the transfer type, the target host name, and so on. Refer to the online field help for details.
  2. Optionally, run the Transform. Script... command. This will start the text editor where you can enter a transformation script, if required. For more information, refer to Transformation script.
  3. Specify a password, in a separate dialog, for XML File Actions with File Transfer Type = Standard FTP. The Enter Password (datrgpwd ) dialog is started automatically when you save the XML file action. You can also manually start this dialog through the Change Password... command.

When you save an XML File Action based on standard FTP, the system checks whether a file transfer can be done using the specified parameters. A message is displayed if this check fails.

When you use the Create XML file action, the following will happen at runtime:

  • If available, the transformation script is executed.
  • Then a unique filename is generated and the XML code is written to the file in the specified local path.
  • Finally, a file transfer, if defined, is performed.

Points of attention

To be able to use this functionality successfully:

The target host and path must be available and an ftp daemon must be running on the target host.

The ftp daemon must be installed at a known port, specified in the etc/services file on the same system where the Bshell is running.

The location of the etc/services file is platform dependent.

Support of user name 'anonymous' and/or 'ftp' depends on how the ftp daemon on remote host is configured.

If the standard file transfer is used, the file is moved in binary mode, because a standard ASCII transfer may not be available on every platform. You can realize an ASCII transfer by customizing the generated program.

Also note that no formatting is done, so the difference between Unix and Windows environments (regarding carriage return and linefeed) is irrelevant.

When a specific program is selected for file transfer, the system only checks whether the specified File Transfer Program file exists.

Notes on performance

The 'create XML file' action is not suitable for very high volumes. This is explained below. Note that the figures mentioned here are only used as an indication and they will differ depending on the specific situation.

Assume you have an Exchange scheme that exports 5,000 rows per minute to a file. Instead of writing a file, you create events and invoke a trigger for each event.

If the trigger doesn't have an action implemented, the speed will be comparable to the original speed. But if you define a 'create XML file' action for the trigger, the speed will be reduced to, for example, 350 events per minute. And if you additionally use a file transfer, the speed will drop further to, for example, 25 events per minute.

The 'create XML file' action creates one file per event, so the overhead is relatively high. Also note that if the files are not picked up, processed and deleted by another application, the number of files in the directory will gradually increase, which will also impact performance.

Note: This session is a modal dialog. When you leave this session and return to the Triggers (datrg1100m000) session, the trigger program is regenerated automatically, if the action settings were changed.

Field Information

Local Path

The folder or directory that is used to store the trigger files that are created.

File Transfer Type

The type of file transfer that must be done. The following options are available:

  • None: after the file is created in the Local Path, no further action is done.
  • Standard FTP: the file is moved using a standard FTP program.
  • Specific Program: a user-defined program on the operating system is invoked. You must specify this program in the File Transfer Program field.
File Transfer Program

You can only edit this field if the File Transfer Type = 'Specific Program'.

You can enter a program name of an operating system program (such as a batch script or an executable). You can use this script for example to copy the created XML file to another system. At runtime, the file transfer program is invoked with one parameter, viz. the file name (including path) of the local XML trigger file.

Host Name

The host (system) where the file should be transferred to. You can only edit this field if File Transfer Type = Standard FTP.

User Name

The user (account) name to be used for the standard FTP. You can only edit this field if File Transfer Type = Standard FTP. You must enter the password for the specified user in a separate dialog.

Target Path

The path, on the target host, the file should be transferred to. This path is used by the standard FTP solution, or as the third parameter for the File Transfer Program.

How to refer to a path on the target system may depend on the FTP setup on that system. Not all paths may be 'visible' and an alias may be used to refer to a specific location in the file system. For example, C:\Workflow\Data\Triggers may have to be referred to as 'workflow-triggers'.

Note: You can leave this field empty, if the target path is coded in the specific file transfer program.

You can only edit this field if File Transfer Type = Standard FTP.

Delete Local File after Transfer

If you select this check box, the local file is deleted automatically after the transfer is completed.

Only clear this check box if you want to keep all XML files (not recommended!) or if the specific File Transfer Program takes care of removing the local file.

You can not edit this field if File Transfer Type = None.