04-09-2024 02:16 PM - edited 04-09-2024 02:17 PM
Hi, All
Any insights or suggestions on how to resolve these obsolete functions after update (we are currently 7.4.2) would be greatly appreciated.
Dashboard Extender:
Connector:
Thank you in advance!
04-09-2024 07:44 PM
Hi @vnareny - It is part of marketplace if so, you have to update your OS Marketplace solution as well.
04-10-2024 01:39 AM
Please refer to this information on upgrading solutions for v8+
04-10-2024 06:06 AM
I am not sure what is going on with these 2 functions. Certainly in the V8 compatible MarketPlace apps where GetBusinessRules is used (and the Rules are not encrypted), they still use the deprecated functions (I checked RCM and RPTA). It looks like the GetBusinessRule function is only used to delete BRs associated with a solution. If you want to get rid of that annoying warning message I think you will have to execute direct SQL calls on the BusinessRule table. It's a simple table so it should not be difficult. I don't know about the others.
04-10-2024 06:44 AM - edited 04-10-2024 12:19 PM
The first two are deprication/obsolecence warnings written by OneStream on internal API functions, probably displayed while you are compiling a Dashboard Extender business rule.
The message is confusing because whether or not the business rule is part of a MarketPlace solution is irrelevant to compiling it.
The message is text the developer who wrote the message used in a tag somewhere in the source code. Its unfortunate the important information such as what function to use instead is not also part of the message.
It would help if it said: GetBusinessRules(SessionInfo si, BusinessRuleType brType) is obsolete. It is replaced by NewFunction(new parameters)
The third message is also a compiler warning, written by Microsoft. You are probably compiling VB.net because the code this warning refers to would throw an error in C#.
This usually happens when assigning a new instance of something that is "shared" to a variable: This is because shared (static) objects are only instantiated once (using New) and shared by all other objects. So declaring it as a new object is redundant since you're still pointing at the shared instance.
Post the code that is giving the error and we can help you correct it to eliminate the warning.
04-10-2024 06:48 AM - edited 04-10-2024 06:54 AM
Both those methods are technically internal, you should not have been using them in the first place... 😁
SetCultureInforForUserToThread, in particular, really should not be used and I can't imagine what sort of use-case one would have for that. Code should respect the choice of Culture expressed in Security, not override it.
As for GetBusinessRules, it's probably a victim of the ongoing move to Workspaces, since it assumes the old architecture. At the moment I can't say if there is an equivalent supported interface (did you try passing a Workspace ID...?); I would expect there might be ways to query the new WsAssemblyService machinery (which can be discovered from objects representing Workspaces and Maintenance Units in the public api) to fetch those, but right now I don't know the correct answer. Looking stuff up in the database is probably the safer approach for now.
If these messages are generated by supported Marketplace Solutions, they will be addressed in future releases. As @sameburn mentioned, there is documentation on which solutions are actually compatible with v8.
The last message, as @RobbSalzmann said, is just a compilation issue. Robb himself addressed it in this thread: https://community.onestreamsoftware.com/t5/Rules/Referencing-C-Workspace-Assemblies-from-VB-Net-Warn...
04-10-2024 11:57 AM
@JackLacava Thanks and it was helpful. Is there a documentation for the same. Not just for this scenario other scenarios if there are any.
04-10-2024 04:56 PM
True. Thanks for the information, JackLacava. The compiling error for GetBusinessRules are coming from the RPTA, SNE, and XLI rules after the update. SetCultureInforForUserToThread it's from the OSD rule and just wanted to get more information about the compiling messages.
04-16-2024 09:43 AM
I found that you get this error when a variable is called the same thing as a function or object. A simple example is resizing an array of strings using the Array command:
Array.Resize(array, array.Length + 1)
The variable is called array and the function is called Array. Change the name of the variable to for example myarray and the warning goes away.