Workspace assemblies - Call functions from another file within the same assembly
Hi
I'm trying to find out the correct way to reference a function in another Workspace assemblies file.
For example say i have:
1) XFBR business rule assembly file (ParamHelper.Vb)
2) Dashboard Extender business rule assembly file (SolutionHelper.Vb)
I want to call a function that is in SolutionHelper.vb from my code that sits in ParamHelper.vb
In standard business rules this was easily achieved using Referenced Assemblies in the business rule property
and then adding something along the lines of this below:
Dim _MYHelper As New OneStream.BusinessRule.DashboardExtender.HPB_SolutionHelper.MainClass
Just not sure how the same is achieved using assemblies
Thank you
In version 8, most of the business rules will be located in the same namespace
Namespace Workspace.__WsNamespacePrefix.__WsAssemblyName
So to access classes within this namespace, just add
Imports Workspace.__WsNamespacePrefix.__WsAssemblyName
to the business rules / files that are not in this namespace
For example:
... Imports Workspace.__WsNamespacePrefix.__WsAssemblyName Namespace Workspace.__WsNamespacePrefix.__WsAssemblyName.BusinessRule.DashboardExtender.SolutionHelper Public Class MainClass ...
This works as well in 7.4.x
So for all files, that are not of dashboard data set, dashboard extender, dashboard xfbr sting or Spreadsheet, business rules equivalent use this namespace.
To save a bit of typing, one can import the whole namespace. For example, assuming you have a class "SomeCustomClass" defined in a DDS called "MyBR":
Imports Workspace.__WsNamespacePrefix.__WsAssemblyName.BusinessRule.DashboardDataSet.MyBR ... Dim myObj as SomeCustomClass = new SomeCustomClass