GetSmartIntegrationConfigValue

This BRAPI allows access to the Local Gateway Local Application Data Settings. Accessing the remotely stored secret or customer-defined configuration values is done using a new "Remote" equivalent of the BRAPI namespace. This feature can be used to:

  • Reference configuration parameters in a remote business rule running on a Smart Integration Connector Local Gateway Server

  • Store credentials to network resources allowing the developer of remote business rules to reference values stored in the configuration file instead of having them hard-coded and viewable by anyone with permission to edit a business rule.

These configuration values are defined and edited using the Smart Integration Connector Local Gateway Configuration Utility. The API used to obtain these values is demonstrated in the full business rule example below:

NOTE: Requires allowRemoteCodeExec = True on Smart Integration Local Gateway.

Here is the rule in C#:

Copy
// SIC Function demonstrating GetSmartIntegrationConfigValue
namespace TestProject.OneStream.BusinessRule.SmartIntegrationFunction.SecretTester
{
 public class MainClass
 {
 public static @bool RunOperation()
 {
 string result;
 // 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
 result = APILibrary.GetSmartIntegrationConfigValue(""); //Enter config value name
 return true;
 }
 }
}

Here is another example in VB.NET:

Copy
' SIC Function demonstrating GetSmartIntegrationConfigValue
 
Namespace OneStream.BusinessRule.SmartIntegrationFunction.SecretTester
 
Public Class MainClass
 Public Shared Function RunOperation() as bool
 Dim result As String
 ' 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
 result = APILibrary.GetSmartIntegrationConfigValue("") ' Enter config value name
 Return True
 End Function
 End Class
End NameSpace