Enterprise Manager logoEM: File System > Asynchronous Trigger Jobs

Access to this feature requires an active Software Asset Management (SAM) subscription. See Benefits of ‘Software Asset Management' Feature Line.

Description

In BBj 15.0 and higher, Asynchronous Trigger Jobs consist of a list of directories and/or files monitored by the BBj filesystem. When a write or remove operation occurs on a monitored file, a BBj program runs on the specified target machine in response to the operation. This program has access to the information provided by the file operation such as the record data, key data, user, IP address, etc.

Asynchronous Triggers vs. File Triggers

Asynchronous triggers differ from standard file triggers in that the file operation does not wait for the trigger operation to complete before continuing. This means there is almost no overhead on the file system. Furthermore, these triggers can be configured to run on a remote BBjServices installation to allow the administrator to distribute the interpreter workload to another machine. As with file triggers, asynchronous triggers can execute any valid BBj code or embedded Java code that does not utilize any user interface related operations.

How Do They Work?

When a write or remove operation occurs on a monitored data file, a record of the operation is put into a queue for processing. The operations are processed in a FIFO (first in, first out) pattern. The queue persists between restarts of both the source and target instances of BBjServices (see BBj File Replication). When the target machine receives an operation to process, it launches the appropriate BBj program:

  • Write Program - Executed when the source performs a WRITE, WRITE RECORD, SQL UPDATE, or SQL INSERT operation.

  • Remove Program - Executed when the source performs a REMOVE or SQL DELETE operation.

Location

Enterprise Manager logoEM NavigatorFile SystemAsynchronous Trigger Jobs

Toolbar

Button Function
Pauses / unpauses the selected job(s)

Sets the selected job(s) to pause when caught up.

instructs the selected job(s) to cancel pause when caught up.
Creates a new asynchronous trigger job.
Removes the selected job(s).
refresh button Refresh the list of asynchronous trigger jobs.
Imports a job from an export file.
Enables to choose a folder/file from your local system.

Asynchronous Triggers Jobs Pane

The Asynchronous Trigger Jobs pane lists configured trigger jobs, showing execution status, processing progress, throughput ratios, operation rates, and lag metrics, with a details area for viewing job-specific runtime information.

Asynchronous Triggers Jobs Settings

Settings Description
Name Identifies each asynchronous trigger job by its configured name.
Status The current operational state of the asynchronous trigger job.
Processed Through The latest timestamp through which the asynchronous trigger job processed.
Last TS Ratio The ratio of expected to actual trigger processing timing, a value of 1 indicates expected processing pace.
Last Op Rate The most recent operations processing rate calculated for the asynchronous trigger job. 0 Indicates no operations were processed.
Last Lag(ms) The most recent processing delay in milliseconds, value 1 indicates minimal one-millisecond lag observed.

Asynchronous Triggers Jobs Pane: Status Details

Runtime messages and diagnostics explaining the current trigger job state, progress, warnings, or errors details.

Creating a New Job

Asynchronous trigger jobs can be created using the BDT Enterprise Manager or the Admin API. For information on managing asynchronous trigger jobs from the Admin API, see the Admin API Javadocs for BBjAdminBase and for BBjAdminAsynchTriggerJob.

Using the Enterprise Manager to Manage Jobs

From the Asynchronous Triggers pane, clicking the icon opens the New Asynchronous Trigger Job Wizard, where users define a trigger job name and choose whether monitoring targets a named database instance or specific data files and directories.

Using the Enterprise Manager to Manage Jobs Settings

Settings Description
Asynchronous Trigger Job Name The unique name assigned to identify and manage the asynchronous trigger job.
Monitor a Named Database Instance Selects a database instance and automatically monitors associated data dictionary and files.
Monitor a List of One or More Data Files and Directories Manually selecting specific data files and directories to monitor, instead of automatically using a configured database instance.

Select Database

After naming the trigger job and choosing database monitoring, clicking Next opens Select Database, where a configured database is chosen to define monitored data.

File System Connection Settings

After selecting the database and clicking Next, the wizard displays File System Connection Settings, where users configure target connectivity, credentials, port, and SSL for access securely.

File System Connection Settings List

Settings Description
Source/ Target On Same Machine
  • When unchecked, enables entering remote host, port, credentials, and SSL options for external file system connections.

  • When checked, configures the job to use the local machine and disables host, port, and credential fields.

Host Name Machine name or IP address of the target machine. The triggered BBj programs will run on this machine.
Port The port number running the Filesystem Server on the target machine. Default is 2000.
User Name User name to use to connect to the target machine.
Password Password for the user.
Use SSL
  • When unchecked, uses a non-SSL file system connection and requires SSL disabled on the target server.

  • When checked, enables SSL for the file system connection and requires SSL enabled on the target server.

Test Settings Tests the specified host, port, credentials, and SSL settings by establishing an actual connection to the target file system server.

Other Job Settings

After completing configuration of the File System Connection Settings, clicking Next opens Other Job Settings to configure advisory locking behavior.

Other Job Settings

Setting Description
Advisory Locking
  • When unchecked, performs no file locking, allowing all processes to access files without coordination.

  • When checked, applies advisory file locks so cooperating processes detect and observe active audit access.

Asynchronous Trigger Programs

After configuring Other Job Settings and clicking Next, the Asynchronous Trigger Programs pane allows specifying programs executed on write or remove operations, including configuration file and working directory paths.

Asynchronous Trigger Programs Settings

Settings Description
Write Program Full path to the BBj program to run when a write operation occurs on a monitored file. Writes from the BBx language or from SQL operations will fire the trigger.
Remove Program Full path to the BBj program to run when a record is removed from a monitored file. Removes from the BBx language or from SQL operations will fire the trigger.
Config File Full path to the working directory used by the trigger interpreter. Leave blank to use the default working directory for the target BBjServices installation.
Working Directory Full path to the working directory used by the trigger interpreter. Leave blank to use default.

Include Directories and Files

After configuring the Asynchronous Trigger Program settings and clicking Next, this wizard defines the directories and files monitored by the job. Any detected write or remove activity within the specified paths, including subdirectories when enabled, invokes the configured trigger programs.

Include Directories and Files Settings

Value Description
Source The directory path monitored for file changes that trigger configured asynchronous job execution.
Pattern The filename pattern used to filter monitored files within the selected source directory.
Recursive The file operation modes used to filter which file system events trigger processing.

Directory File Filter

From Included Directories and Files, clicking the opens the Directory/File Filter dialog, where users define directory or file sources, optional modes, and recursive behavior, then confirm selections for inclusion.

Directory File Filter Settings

Settings Descriptions
Type

Specifies how sources are defined when adding directories or files.

Value Description
Directory Targets a specific directory path as the monitored source location.
File Targets a single file path as the monitored source only.
Wildcard Uses wildcard patterns to match multiple files or directories paths.
Regular Expression

Uses regular expressions to precisely match files or directories paths.

Source Directory Clicking the icon opens directory browsing; selecting a local directory populates Directory Name and Source Directory, while clicking the icon opens Create New Folder to define, create, and select a new directory before confirmation.
Modes The file operation modes used to filter which file system events trigger processing.
Recursive
  • When unchecked, applies filter only to the specified directory level paths directly.

  • When checked, applies filter recursively to all subdirectories under the specified directory.

Excluded Files / Directories

After completing Directory/File Filter configuration and clicking Next, the Excluded Files/Directories pane enables refining scope by moving selected included files or directories to the excluded list by clicking the icon , and removing excluded entries by selecting the file and clicking the icon, ensuring precise control over which files and subdirectories are omitted from auditing.

Wildcard/Regex Exclude Filter

Clicking the icon in Excluded Files/Directories opens the Wildcard/Regex Exclude Filter, where users define pattern-based exclusions by selecting a type, choosing a source directory, entering a match pattern, and confirming to exclude matching files or subdirectories from the audit job.

Wildcard/Regex Exclude Filter Settings

Value Description
Type

Specifies how sources are defined when adding directories or files.

Value Description
Wildcard Uses wildcard patterns to match multiple files or directories paths.
Regular Expression

Uses regular expressions to precisely match files or directories paths.

Source Directory Clicking the icon opens directory browsing; selecting a local directory populates Directory Name and Source Directory, while clicking the icon opens Create New Folder to define, create, and select a new directory before confirmation.
File Targets a single file path as the monitored source only.
Pattern Specifies wildcard or regular expression used to match files for exclusion patterns.

Editing Selected Audit Job

Selecting and double clicking an asynchronous trigger job from the Asynchronous Triggers pane opens its configuration view, displaying connection, authentication, locking, and filter settings. Users can manage included and excluded directories, add new directory filters using the icon , or remove selected files/directories by clicking the icon.

See Also

BBjAdminBase

Replication Introduction

Audit Logging Jobs