AndreaF
7 months agoContributor III
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 Fu...
- 6 months ago
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