Analysis Programming Language (APL)

APL is a structural language with a syntax that to a great extent resembles Java or C/C++ programming language. It supports most standard features of a programming language, plus interfaces to the platform for manual logging of events and errors etc. To enable advanced processing it is also possible to load dynamic plug-in functions.

Function Blocks

The APL code is divided into function blocks where each block is executed at different stages of the data processing. The number and type of function blocks executed depends on whether the APL is used in a batch or real-time workflow. The figure below illustrates the executed function blocks and their order depending on workflow type.

Function blocks in batch and real-Time processing workflows

Among other things, APL includes support for the following functionality:

  • Conditional expressions: if, else, for

  • Iterative statements: while

  • Wide range of string functions (including regular expressions)

  • Wide range of date functions

  • Routing on different output routes

  • Local and global variables

  • Exception handling

  • Associative maps

  • Database lookups

  • Retrieval of value from any UDR field (including nested) or variable

  • Checking for particular record type

  • Functions (both local to a node and global)

  • Assignment to variables or fields of a UDR

  • Creation of new UDR of any type

To add APL to a processing flow, the Analysis Agent or the Aggregation Agent can be used. The APL code is written within the agents to perform tasks like data validation. Separate APL Code configurations can also be imported into these agents.

Example of APL code in an Analysis agent

All logic configured in APL will be dynamically compiled to machine code at runtime for performance reasons. No interpretation of the logic is performed.

APL is accessible from the Analysis and Aggregation agents and from various applications in the system where flexibility is required.

APL is tightly integrated into the UDR and workflow models, enabling access and manipulation of runtime-, persistent-, and meta-data. Examples of such functionality include:

Functionality

Description

Functionality

Description

UDR operations

UDRs can be viewed, filtered, routed, created, cloned, decoded, encoded and modified, etc.

Meta Information Model (MIM)

Meta information variables available for a workflow (MIMs) can be accessed, created, published, and assigned. Any published information is available to any agent within the workflow.

Error Correction System

UDRs failing specified validation criteria can be classified with respect to the error and be routed to the Error Correction System (ECS) for corrective action.

Audit

Audit and statistical information based on workflow execution can be logged in user-defined database tables.

Lookups

SQL/LDAP statements and calls to stored procedures can be executed from APL. A number of functions for memory caching and indexing are available, as well as prepared statements and bulk-SQL features for high performance table lookups, with minimal overhead

External References

Property based definitions of APL values based on a certain key. This functionality enables the APL configuration to make dynamic runtime decisions based on parameters in an externally stored property file.

Events

provides various ways of dispatching information to different parts of the system or externally:

Events can be sent to the System Log classified as ‘Error’, ‘Warning’, or ‘Information’

Events can also be sent directly to the Event Manager for distribution to other targets (SNMP trap, log file, database table, etc)

Debug information can be sent to a log file, or directly to the Workflow Monitor

Alarms

It is possible to configure and trigger potential Alarm conditions from within the workflow configuration as well as from the alarm detection GUI. These conditions provide a very flexible mechanism to visualize alarms.