Analysis APL Code Editor

The APL Code Editor, as opposed to the Aggregation and Analysis agents' code areas, is used to create generic APL code, that is, code that can be imported and used by several agents and workflows.

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

The APL Code Editor

The APL Code Editor

The menu items that are specific to APL Code Editor are described in the following table: 

Option

Description

Option

Description

Edit

Edits the entered APL code.

New

Creates a new APL code entry.

Open

Opens the list of saved APL code entries.

Save As

Opens the Save As dialog box where you can save the APL code entry. You must enter the mandatory parameters to save the entry. Specify the Folder by using the Browse button and navigating to the destination, then confirm the selection by pressing the OK button. Specify the APL code name in the Name field and you can type an optional Version Comment. 

Save As Dialog Box

Permissions

View/edit the APL code permissions.

Permissions Dialog Box

References

View the External References available for the APL code entry.

History 

View the version history for the APL code entry.

Help

Open the online documentation. 

The generic code is imported by adding the following code in the agent code area, using the import keyword:

import apl.<foldername>.<APL Code configurationname>


If generic code is modified in the APL Code Editor, the change is automatically reflected in all agents that contain this code the next time each workflow is executed.

Since function overloading is not supported, make sure not to import functions with equal names, since this causes the APL code to become invalid, even if the functions are located in different APL modules. This also applies if the functions have different input parameters, for example, a(int x) and a(string x).

Note!

Not all functions work in a generic environment, for example, functions related to specific workflows or MIM-related functions. This type of functionality must be included in the agent code area instead.

Example - An APL code definition

An APL code definition, saved as MyGenericCode in the Default directory, is available to an agent by adding the following into its code area:

import apl.Default.MyGenericCode;