Business Layer Components (for FIXEdge Java)
- 1 Overview
- 2 BL component manager
- 3 BL components table view
- 3.1.1 Filtering pane
- 3.1.2 Action pane
- 3.1.3 List of BL components
- 3.2 Create BL component
- 3.3 Clone BL component
- 3.4 Enable/disable BL component
- 3.5 Remove BL component
- 3.6 BL component details view
- 3.6.1 Actions
- 3.7 BL component editor (Business rule)
- 3.8 Business rule binding
- 3.8.1 Bind rules
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 | |
---|---|
Business Rules (Rules) |
|
BL component manager
To view the server BL components:
Click Configurations (left menu bar)
Click Configurations > Servers
Click Configurations > Servers > Show all servers
Select a server in the Servers table view
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:
Click Create on BL component table view
Select a BL component type
Clone BL component
To clone a BL component:
Select a BL component on the BL component table view
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:
Select a BL component on the BL component table view
Click Enable/disable on BL component details view
Remove BL component
To remove a script:
Select a BL component on the BL component table view
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:
FIX session. Specifies a source by SenderComId, TargetCompId, or Session qualifier.
FIX session by name. Specifies a source by selecting an existing FIX session from the list
FIX session by regex. Specifies a source that matches a regular expression
Transport adaptor by name. Specifies a source by selecting an existing transport adaptor from the list
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:
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:
Click Configurations > Servers > Show all servers (left menu bar)
Double-click on a server or click view FIX in the context menu
Select a session
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:
Select a session
Open Business Layer Configuration tab in the Session Details view
Click Bind
Select rules in Server's Rules dialogue
Click Bind Selected
Figure. Rule binding dialogue