/
Business Layer Components (for FIXEdge Java)

Business Layer Components (for FIXEdge Java)

Overview

Business Layer Components or BL components are the main elements of FIXEdge Java business layer configuration.

FIXEdge Java offers a set of BL components, which can be useful to determine message routing, session events, scripting, message modification, plug-in connection, histories management, and automatic routing for some types of messages.

BL components

BL components

Business Rules (Rules)

  • Rule

  • Create Session Handler

  • Rule Fail Handler

  • Session State Handler

  • Undelivered Message Handler

BL component manager

To view the server BL components:

  1. Click Configurations (left menu bar)

  2. Click Configurations > Servers 

  3. Click Configurations > Servers > Show all servers

  4. Select a server in the Servers table view

  5. Click Configurations > Business Layer Components in Details view

BL components table view will be opened in a new tab


Fig. View server BL components

BL components table view

Figure. BL component table view

Filtering pane

Allows to filter the list of BL components by:

  • Name

  • Description

  • Condition

  • Source

  • Component type

  • Enabled

Action pane

Create - Allows creating a new BL component

Clone  - Opens the copy of the selected BL component for editing in a new tab

Edit - Opens the selected BL component for editing in a new tab

Remove - Removes the selected BL component

List of BL components

Contains a filtered list of BL components in the table

You can customize the table or sort it by any attribute

Figure. Table sorting and customization

Create BL component

To create a new BL component:

  1. Click Create on BL component table view

  2. Select a BL component type

Clone BL component

To clone a BL component:

  1. Select a BL component on the BL component table view

  2. Click Clone on BL component table view or click Clone on BL component details view

Enable/disable BL component

FIXICC H2 allows disabling BL components. Disabled BL components are not executed 

To enable/disable a BL component:

  1. Select a BL component on the BL component table view

  2. Click Enable/disable on BL component details view

Remove BL component

To remove a script:

  1. Select a BL component on the BL component table view

  2. Click Remove on BL component table view or click Remove on BL component details view

BL component details view

Contains BL component details:

  • Rule type

  • Name

  • Priority

  • Description

  • FROM, IF, THEN, ELSE sections

Figure. BL component details

Actions

View in tab - Opens the BL component details in a new tab

View matching (for Business rules) - Shows a list of endpoints (FIX sessions and transport adaptors) that are affected by this rule

Figure. Matching endpoints

Edit - Opens the BL component for editing in a new tab

Disable/Enable - Disables/enables the BL component

Remove - Removes the BL component

BL component editor (Business rule)

The appearance of the editor differs depending on the type of BL component

Editor for Business rules contains:

  • Name

  • Description

  • Status (Enabled/disabled)

  • Priority

  • FROM section

  • IF section

  • THEN section

  • ELSE section

  • EXCEPTION section

Figure. Business rule editor

Rule priority

You can specify a priority of a business rule. The rule with the highest priority value is executed first

FROM section

The FROM section contains specified sources. There are different ways to specify a source for a given rule:

  1. FIX session. Specifies a source by SenderComId, TargetCompId, or Session qualifier. 

  2. FIX session by name. Specifies a source by selecting an existing FIX session from the list

  3. FIX session by regex. Specifies a source that matches a regular expression

  4. Transport adaptor by name. Specifies a source by selecting an existing transport adaptor from the list

  5. Transport adaptor by regex. Specifies a source that matches a regular expression

To add a new source click Add > select Source Type

To view a list of endpoints (FIX sessions and transport adaptors) that are affected by this rule click Additional actions > Show matching endpoints 

To clear the list of sources click Additional actions > Remove all sources

IF, THEN, ELSE, and EXCEPTION sections

The business rules may contain 3 sections:

IF

Condition section. A set of pre-defined criteria

Optional

THEN

The instructions that must be performed when the conditions are met

Mandatory when ELSE is empty

ELSE

The instructions that must be performed when the conditions are not met

Mandatory when THEN is empty

EXCEPTION

The instructions that must be performed when the error occurs during the execution of the instructions in the THEN or ELSE section

Optional

Groovy DSL Support for Rule Definition

Available since FIXICC H2 1.1.0 release.

FIXICC H2 for FIXEdge Java supports Groovy DSL (Domain Specific Language) to define business rules within Business Layer Components.

When creating or editing a rule, you can now opt to define the rule using Groovy DSL, offering a more concise and streamlined approach. While previous versions of FIXEdge Java utilized standard Groovy scripting for rule definition, Groovy DSL provides a specialized alternative, particularly beneficial for expressing conditional logic and actions related to FIX workflows.

To enable Groovy DSL for a rule, locate the "New Groovy DSL" checkbox in the BL component editor and enable it:

Frame 5-20250224-105246.png

Figure. Business rule editor and the "New Groovy DSL" checkbox

While you will primarily interact with Groovy DSL through the IF and WHEN blocks in the user interface when defining rule logic, enabling the "New Groovy DSL" checkbox means that the entire rule definition will be processed and interpreted by the server as a Groovy DSL rule. If you leave the "New Groovy DSL" checkbox unchecked, the rule will be defined using standard Groovy scripting, ensuring compatibility with existing rules and providing flexibility for more complex scripting needs. For details on the standard Groovy rule syntax and capabilities, please refer to the "Business rules configuration" document.

For comprehensive information on authoring rules with Groovy DSL, including syntax, available elements, and rule structure, please consult the "Groovy DSL Rules" document.

Business rule binding

FIXICC H2 allows binding business rules to a given session (endpoint) by name. Also, you can view all rules that affect the given session (e.g. in case a rule is specified by regular expression or CompIDs)

To view the rules bound to a session:

  1. Click Configurations > Servers > Show all servers (left menu bar)

  2. Double-click on a server or click view FIX in the context menu

  3. Select a session

  4. Open Business Layer Configuration tab in the session details view

The Business Layer Configuration tab contains:

Session Rules section  - The list of bound rules

Acting Rules section - The list of rules that affect the session

Figure. Business rule binding

Bind rules

To bind rules to a session:

  1. Select a session

  2. Open Business Layer Configuration tab in the Session Details view

  3. Click Bind

  4. Select rules in Server's Rules dialogue

  5. Click Bind Selected

Figure. Rule binding dialogue

Related content