Aggregation Agent - Batch(3.3)

The batch Aggregation agent's configuration dialog contains the following tabs:

  • Aggregation - This tab contains the three subsidiary tabs, General , APL Code and Storage.
  • Thread Buffer - For further information about the Thread Buffer tab, see Workflow Template (3.0).

General Tab

The Aggregation agent configuration dialog - General tab

SettingDescription

Profile

Click Browse... and select an Aggregation profile.

All the workflows in the same workflow template can use different Aggregation profiles. For this to work, the profile has to be set to Default in the Field settings tab in the Workflow Properties dialog. After that, each workflow in the  Workflow Table can be assigned with the correct profile.

Force Read Only

Select this check box to only use the Aggregation Storage for reading aggregation session data. When you select this check box, the agent cannot create new sessions when an incoming UDR cannot be matched to an existing session. A UDR for which no matching session is found is handled according to the setting If No UDR Match is Found.

If you select this setting, timeout and defragmentation handling is also disabled.

When you are using file storage and sharing an Aggregation profile across several workflow configurations, the read and write lock mechanisms that are applied to the stored sessions must be considered:

  • There can only be one write lock at a time in a profile. This means that all but one Aggregation agent must have the  Force Read Only setting enabled.

  • If all of the Aggregation agents are configured with  Force Read Only , any number of read locks can be granted in the profile.

  • If one write lock or more is set, a read lock cannot be granted.

If Timeout is Missing

Select the action to take if timeout for sessions is not set in the APL code using sessionTimeout. The setting is evaluated after each consume or timeout function block has been called (assuming the session has not been removed).

The available options are:

  • Ignore - Do nothing. This may leave sessions in the system indefinitely if the closing UDR does not arrive.

  • Abort - Abort the agent execution. This option is used if a timeout must be set at all times. Therefore, a missing timeout is considered a configuration error.

  • Use Default Timeout - Allow the session timeout to be set here instead of within the code. If enabled, a field becomes available. In this field, enter the timeout, in seconds.

If No UDR Match is Found

Select the action that the agent is to take when a UDR that arrives does not match any session, and Create Session on Failure is disabled in the profile configuration:

  • Ignore - Discard the UDR.

  • Abort - Abort the agent execution. Select this option if all UDRs are associated with a session. This error case indicates a configuration error.

  • Route - Send the UDR on the route that you select from the on list. This is a list of output routes on which the UDR can be sent. The list is only activated if Route is selected.

APL Code Tab

The APL Code tab allows you to manage the detailed behavior of the Aggregation agent. You use the Analysis Programming Language (APL) with some limitations but also with additional functionality. For further information see Aggregation APL Functions(3.0).

The main function block of the code is consume. This block is invoked whenever a UDR has been associated with a session.

The timeout block enables you to handle sessions that have not been successfully closed, e g if the final UDR has not arrived.


ItemDescription

Code Area

This is where you write your APL code. For further information about the code area and its right-click menu, see Text Editor in <Administration and Management>.

Compilation Test...

Use this button to compile your code and check that it is valid. 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.

Outline

Use this button to display or hide the APL Code Editor Outline navigation panel. The navigation panel provides a view of all the blocks, variables and methods in an APL code configuration and makes it possible to easily navigate between different types in the APL code. For further information on the Outline navigation panel, see <Administration and Management>.

Storage Tab

The Storage tab contains settings that are specific for the selected storage in the Aggregation profile. Different settings are available in batch and real-time workflows.

File Storage

The Aggregation agent configuration dialog - Storage tab for File Storage


SettingDescription

Defragment Session Storage Files

For batch workflows, the Aggregation session storage can optionally be defragmented to minimize disk usage. When checked, configure the defragmentation parameters:

Defragment After Every [] Batch(es)

Run defragmentation after the specified number of batches. Enter the number of batches to process before each defragmentation.

Defragment if Batch(es) Finishes Within [] Second(s)

Set a value to limit how long the defragmentation is allowed to run. This time limitation depends on the execution time of the last batch processed. If the last batch is finished within the specified number of seconds, the remaining time will be used for the defragmentation. The limit accuracy is +/- 5 seconds.

Defragment Session Files Older Than [] Minute(s)

Run defragmentation on session storage files that are older than this value to minimize moving recently created sessions unnecessarily often.

Elasticsearch Storage and SQL Storage

The Aggregation agent configuration agent - Storage tab for Elasticsearch

The Aggregation agent configuration agent - Storage tab for SQL

Setting

Description

If Error Occurs in Storage

Select the action that the agent should take when an error occurs in the storage:

  • Ignore  - Discard the UDR.

  • Log Event  - Discard the UDR and generate a message in the System Log.

  • Route  - Send the UDR on the route selected from the on list. This is a list of output routes on which the UDR can be sent. The list is only activated if Route is selected.

Disable TimeoutSelect this check box to disable the timeout handling.

Transaction Behaviour

Emits

The agent emits commands that change the state of the file currently processed.

Command

Description

Cancel Batch

The agent itself does not emit Cancel Batch messages. However, if the code contains a call to the method cancelBatch this causes the agent to emit a Cancel Batch.

Hint End Batch

If the code contains a call to the method hintEndBatch, this causes the agent to emit a Hint End Batch.

Retrieves

The agent retrieves commands from other agents and, based on those commands, changes the state change of the file currently processed.

Command

Description

Begin Batch

When a Begin Batch message is received, the agent calls the beginBatch function block, if present in the code.

End Batch

When an End Batch message is received, the agent calls the endBatch function blocks, if present in the code.

Prior to End Batch, possible timeouts are called. Thus, when a time limit is reached, the timeout function block will not be called until the next End Batch arrives. If the workflow is in the middle of a data batch or is not currently receiving any data at all, this could potentially be some time after the configured timeout.

Cancel Batch

When a Cancel Batch message is received, the agent calls the cancelBatch function block, if present in the code.

Debug Events

Debug messages are dispatched in debug mode. During execution, the messages are displayed in the Workflow Monitor.

You can configure Event Notifications that are triggered when a debug message is dispatched. For further information about the debug event type, see Debug Event(3.0).

The agent produces the following debug events:

  • Aggregation Storage implementation
    This event is reported during workflow initialization. It shows the selected storage type i e file storage ,Couchbase, or Redis.

You may also configure debug messages in the APL code.