Extended Rules Library
This section describes how to use the extended rule library and the properties of the dialog boxes that comprise its functionality. A rules library (used with SWIFTNet, Fedwire, and any other data format) contains a list of rules in a separate file outside of the Sterling B2B Integrator Map Editor source.Sterling B2B Integrator Map Editor stores the name of the library in its source file, so when you open a map the library is also loaded. Only the library extended rules referenced by a map are compiled into the compiled (.TXO) translation object. This enables you to create a library of extended rules and then add it to any other map, so you do not have to recreate those extended rules after the first time. You can use this functionality with any data format.
The extended rule libraries are used when maps are compiled, not at runtime.
This functionality minimizes the impact to users when, for example, SWIFT updates their messages—without the rule library you would need to update the extended rules for each updated map (correlating to the updated messages), but using the extended rule library you just update the library and then use the library with all the applicable maps.
When you view the checked in libraries through the Extended Rule Library check in interface, you are also able to obtain a list of all the maps that use each library.
The extended rules library can contain many rules. An extended rule consists of a declarations section followed by a statements section. The declarations section is required only if you use additional variables. The declarations section is where you declare the names and types of any variables you use either in the extended rule. The statements section is where you define the actions that you want the extended rule to run.
You must declare any variables that are not already defined as part of the input or output specification of the map before you use those variables in an extended rule. For the extended rule libraries, any variables can be passed as parameters. Global variables can be referenced within a library function if the function has “Text Substitution” selected. However, we recommend that you do not use “Text Substitution” then you do not have a reusable library of functions.
Rule libraries are versioned resources. When you create a new rule library you need to check it in to Sterling B2B Integrator just like you need to check in maps. This also enables you to check out, version, and delete extended rule libraries. Furthermore, when you view the checked in libraries through the Extended Rule Library check in interface, you can also see all the maps that use each library. This is very important because it enables you to easily view a list of the maps that will need to be recompiled if you change an extended rule in a library (you would recompile all the maps that use that particular library). See Managing Extended Rule Libraries.
Additionally, you can import and export extended rule libraries into Sterling B2B Integrator using the Resource Manager. See Importing and Exporting Extended Rule Libraries.
You can call an extended rule from a library in any extended rule in a map.