11.1 APL Collection Strategy

This section describes the APL Collection Strategy.

Prerequisites

The reader of this document should be familiar with:

Overview

Collection Strategies are used to setup rules for handling collection of files from the Disk, FTP, SFTP, and SCP collection agents.

APL Collection Strategy configurations are used on top of pre-defined collection strategies to customize how files are collected from the local file system.  

Configuration

To open the configuration, click the New Configuration button in the upper left part of the Desktop window, and then select APL Collection Strategy from the menu.

APL Collection Strategy Menu

The main menu changes depending on which configuration type that has been opened in the currently active tab. There is a set of standard menu items that are visible for all configurations and these are described in 2.1 Menus and Buttons.

The menu items that are specific for APL Collection Strategy configuration are described in the following sections.

The File Menu

Item

Description

Import...

Select this option to import code from an external file. Note that the file has to reside on the host where the client is running.

Export...

Select this option to export your code to an *.apl file that can be edited in other code editors, or be used by other  systems.


The Edit Menu

Item

Description

Validate

Compiles the current APL Collection Strategy code, checking for grammatical and syntactical errors. The status of the compilation is displayed in a dialog. Upon failure, the erroneous line is highlighted and a message, including the line number, is displayed.

Undo

Select this option to undo your last action.

Redo

Select this option to redo the last action you undid with the Undo option.

Cut

Cuts selections to the clipboard buffer.

Copy

Copies selections to the clipboard buffer.

Paste

Pastes the clipboard contents.

Find...

Displays a dialog where chosen text may be searched for and, optionally, replaced.

Find Again

Repeats the search for the last string entered in the Find dialog.


APL Collection Strategy Buttons

The toolbar changes depending on which Configuration type that is currently open in the active tab. There is a set of standard buttons that are visible for all Configurations and these buttons are described in 2.1 Menus and Buttons.

The additional buttons that are specific for the APL Collection Strategy configuration are described in the following sections:


Button

Description

Validate


Compiles the current APL Collection Strategy code, checking for grammatical and syntactical errors. The status of the compilation is displayed in a dialog. Upon failure, the erroneous line is highlighted and a message, including the line number, is displayed.

Undo

Select this option to undo your last action.

Redo

Select this option to redo the last action you undid with the Undo option.

Cut

Cuts selections to the clipboard buffer.

Copy

Copies selections to the clipboard buffer.

Paste

Pastes the clipboard contents.

Find...

Displays a dialog where chosen text may be searched for and, optionally, replaced.

Find Again

Repeats the search for the last string entered in the Find dialog.

Zoom Out

Zoom out the code area by modifying the font size. The default value is 12(pt). Clicking the button between the Zoom Out and Zoom In buttons will reset the zoom level to the default value. Changing the view scale does not affect the configuration.

Zoom In

Zoom in the code area by modifying the font size. The default value is 12(pt). Clicking the button between the Zoom Out and Zoom In buttons will reset the zoom level to the default value. Changing the view scale does not affect the configuration.


APL Collection Strategy Dialog

You create your APL Collection Strategy in the dialog.

The APL Collection Strategy Configuration


SettingDescription

Base Collection Strategy

From the drop-down list, select a pre-defined collection strategy. The Default Collection Strategy is the standard collection strategy that is used by default by the Disk and FTP agents.

Note!

The Base Collection Strategy is the collection strategy that your APL Extension will be based on.

When saving your new collection strategy, make sure to use a descriptive name since it will be added to the list of available strategies in the agent's configuration.

The code that you see in the dialog is a default 'skeleton' set of functions blocks that are already defined in the Base Collection Strategy. By adding APL code within these functions blocks, you customize the way by which the collection is going to be handled by the workflow.

  • initialize
  • deinitialize
  • prepareBaseDirList
  • accept
  • filterFiles
  • preFileCollection
  • postFileCollection
  • begin
  • commit
  • rollback

For more information about APL functions blocks and functions, see the APL Reference Guide.

APL Collection Strategy Outline

In order to make it easier to navigate in an APL Collection Strategy code configuration, there is an Outline navigation panel to the right of the dialog.

The Outline provides a view of all all the blocks, variables and methods in an APL Collection Strategy code configuration and makes it possible to easily navigate between different types in the APL Collection Strategy code. The entries in the navigation panel are automatically updated as you make valid entries in the APL Collection Strategy configuration.

You can also filter what you want to display in the Outline. You can search for a specific block, variable or method using the free text field, or by selecting one of the quick filter buttons for different types:

FilterDescription
b

Click to display or hide the blocks within the APL code displayed in the APL Collection Strategy configuration.

v

Click to display or hide the variables within the APL code displayed in the APL Collection Strategy configuration.

m

Click to display or hide the methods within the APL code displayed in the APL Collection Strategy configuration.

The Outline navigation panel can be hidden or visible. By default, it is visible and all the elements are displayed. To hide or display the navigation panel, click the vertical Outline button to the right of the APL Collection Strategy dialog.

APL Collection Strategy Outline navigation panel

Configuration Diff Panel

If you want to compare the current version of an APL collection strategy that you are displaying with a previous version of the same APL collection strategy, you can use Configuration Diff to compare the two versions side by side.

To hide or display the Configuration Diff panel, click the vertical Diff button to the right of the APL Collection Strategy dialog. To select the version to which you want to compare the version currently displayed, click the History drop box directly below the Configuration Diff panel, and select the version you want to view. The panel can be hidden or visible. By default, it is hidden.

APL Collection Strategy - Configuration Diff panel

You can navigate through the differences by scrolling both panes in parallel using the scroll bar to the right of either pane. If you want to scroll through each pane separately, hover over the pane that you want to scroll through, and use the scroll wheel on your mouse.

If you want to skip through each difference in the panes, you can use the navigation buttons, Previous, Next and Refresh, which are described below.

ItemDescription
History

Click the History drop box to select the version to which you want to compare the version currently displayed.

You can also display and view encrypted configurations. If you select an encrypted configuration, you are prompted to enter the relevant password to decrypt the configuration.

Previous
 
Click this button to skip to the previous difference in the configurations. The previous difference is highlighted in green.
Next
 
Click this button to skip to the next difference in the configurations. The next difference is highlighted in green.
Refresh
 
Click this button to display the updated version of the configuration. Configurations are not locked when you display them in Configuration Diff. If another user has modified and saved a configuration that you are viewing in this tool, you can click this button to view the latest updated version.

The FileInfo UDR Type

The FileInfo UDR type includes the properties of the file to collect or a directory where files are stored.

The FileInfo UDR type can be viewed in the UDR Internal Format Browser. To open the browser right-click in the editing area of an APL Editor and select  UDR Assistance... . The browser opens.

Format

The following fields are included in the FileInfo UDR:

Field
Description
isDirectory(boolean)Set to True if FileInfo represents a directory.
isFile(boolean)Set to True if FileInfo represents a file.
name(string)The name of the file or directory.
size(long)The size of the file or directory.
timestamp(long)The timestamp for when the file or directory was last modified.