When I started working on OneStream, I liked the Business Rules editor (it is kind of like an IDE). However, I was not able to figure out how to add an external dll reference to the rule I created.
I had to send an email to Shawn Stalker to find out how this can be done. He graciously pointed to me that there is a properties tab in the rule editor.
I’ve overlooked that tab because the moment you create the rule, the formula tab gets activated, and I never realized that it was a tabbed page. That is where you provide access to users. I never saw that one 😉
There are different ways to refer to the dll file, and you might be thinking, “Different ways!”
The best approach is to create a business rules assembly folder (on the server) and add that in the Application server configuration file.
How to add the dlls
You can do so using “OneStream Server Configuration Utility,” always remember to run it as an administrator.
Navigate to the configuration file location.
Update the setting “Business Rules Assembly Folder” to the newly created folder.
You can now add the dll files to this location. Go ahead. I’ll wait.
I’m using an external dll that can be used to generate EXCEL files using Vb.net (it is better than interop).
Now to refer this dll is easy; all you need to do it add XF\dll name in the rule as shown below.
All you need now is to import the namespaces and code away.
How to call other business rules functions
It is way easier now that I found the referenced assemblies link.
All you need is the business rules name and add them as BR\business rule name in the rule as shown below.
You can add a new instance as follows (lines 64, 65, and 66). Once done, you can then refer all the public functions in the referenced rule.
Keep in mind that the intellisense won’t show you the methods from external dlls and other business rules.