Smart Integrator Connector - Retrieve configuration values
Hi,
we have just added some local configuration values to local Gateway like in the following example:
I am trying to retrieve those values. My understanding is that a Smart Integration Function must be created and that can than be called from a dashboard extender rule for example. However, the example provided in the OneStream documentation for the SIC function confuses me: shouldn't the RunOperation function return the Result?
Anyway, even setting the function type to String and returning the Result string, I am still having some issue in the getting the value over to a dashboard business rule. I am following another OneStream example in this case. First of all the "ObjectResult" does not exist as a member of "RemoteRequestResultDto"
I have therefore tried to use a different member like "objectResultValue".
I can compile the rule this one, but I get the following error when trying to run the business rule:
"Object reference not set to an instance of an object."
Anyone has been able to retrieve and use the Gateway local configuration values, and would be so kind to point me to the right direction?
Example of Smart Integration Function to retrieve the Local Gateway configuration values:
Imports System Imports System.Collections.Generic Imports System.Data Imports System.Data.Common Imports System.Globalization Imports System.IO Imports System.Linq Imports OneStreamGatewayService Namespace OneStream.BusinessRule.SmartIntegrationFunction.RemoteGatewayValueFetcher Public Class MainClass 'Default function (Excuted when FunctionName in ExecRemoteGatewayBusinessRule is Null or Empty Public Shared Function RunOperation() As DataTable 'APILibrary is the class containing new remote BRAPI methods 'GetSmartIntegrationConfigValue returns the string value of a found configuration element 'Returns empty String If the specified key Is Not found Dim sUserName As String = APILibrary.GetSmartIntegrationConfigValue("sFTP_EBS_PROD_UserName") Dim sPassword As String = APILibrary.GetSmartIntegrationConfigValue("sFTP_EBS_PROD_Password") Dim sHostKeyFingerprint As String = APILibrary.GetSmartIntegrationConfigValue("sFTP_EBS_PROD_SshHostKeyFingerprint") Dim dt As New DataTable("Result") dt.Columns.Add("Name",System.Type.GetType("System.String")) dt.Columns.Add("Value",System.Type.GetType("System.String")) 'Password Dim row1 As DataRow = dt.NewRow() row1("Name") = "UserName" row1("Value") = sUserName dt.Rows.Add(row1) 'UserName Dim row2 As DataRow = dt.NewRow() row2("Name") = "Password" row2("Value") = sPassword dt.Rows.Add(row2) 'HostKeyFingerprint Dim row3 As DataRow = dt.NewRow() row3("Name") = "HostKeyFingerprint" row3("Value") = sHostKeyFingerprint dt.Rows.Add(row3) Return dt End Function End Class End Namespace