Layering a Configuration: How to use Constants to make Maintenance easy

Tijana Zivić, Head of Configuration Atfinity, 22. June 2022


Our clients use Atfinity to automate some of the most sophisticated processes that banking has to offer. Have you ever tried mapping the onboarding process of a trust account? Having gone through that I can tell you it’s a very large and complex process. The larger a process, the harder it can be to change the configuration when this becomes necessary. Changes will come: Be it your corporate identity, a new regulation, new products or something else. 

 

Most of our clients adapt their processes at least once per year, so we have developed many ways to make such changes very easy. One of the nicest ways is to layer the configuration: Instead of writing everything in a large block, spend some time thinking about which parts change more frequently and put them in a lower layer. Then build higher layers that use these layers. When you then change the lower layer, things above are just magically correct. 

 

But how do you build such a layer? One very nice option is to use constants. Constants are special data points in Atfinity that are already known before a case even starts. You could put the name of your organisation or the list of countries you would like to work with in such a constant. You can then reuse these data points everywhere else. 

 

Let’s look at a few examples.

Interest rates

Interest rates are often used in formulas and rules in our configurations. They change from time to time, so it is important to have an efficient way to update these values. If the values would be used directly in formulas, every update would need to include updating all the formulas.

Organising configuration in layers and using constants makes the update very efficient. Create a constant for the interest rates, and use it in all the formulas and rules, instead of using values directly.

Constants.INTEREST_RATES := {
   CHF: ‘-.25’
   EUR: ‘0.5’,
   USD: ‘1.00’,
   GBP: ‘0.75’,
}

The weekly update will only require updating the values in this constant. All the formulas and rules will automatically use the latest values from the constant, ensuring always correct results.

Contact email

The contact email address of an organisation is often used in many places in one configuration, e.g. in most of the documents or in rules which send emails automatically. Changing the contact email address would require going through all the documents and rules to manually change it. In addition to being a large effort, it is very error prone. If one of the rules is forgotten, users would get wrong information or an invalid email address. 

Putting the contact email address in a lower layer, and using it in the rules makes the process more efficient and more robust. Instead of typing the email address directly in rules, create a constant for it, and use the constant in all the upper layers.

Constants.CONTACT_EMAIL_ADDRESS := info@atfinity.swiss’


When a change is needed, the only thing to do is to change the value of the constant. All the rules will automatically use the newly provided email address.


Conclusion

As you can see, layering a configuration makes it easy to change things when you have to. It takes some experience to figure out where constants are needed. If you need any help, our experts are happy to give you a few suggestions.