The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
AndreaF
1 year 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...
- 1 year 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
AndreaF
1 year agoContributor III
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
Related Content
- 9 months ago
- 2 years ago