Business Rule for SFTP
Hi - we're trying to PULL files from an SFTP server. These will be used for our OneStream load. Are there any sample BRs that we can reference to facilitate the file transfer from the SFTP server to OneStream? Are there libraries readily available in OS for this? So far, we have completed the following. 1. Whitelisting of OS IP from SFTP Server 2. Received SFTP server and credentials needed Thanks!4.1KViews0likes8CommentsEncryptText And DecryptText Replacement
Does anyone know what replaces the 2 utility commands below? I get a warning message that those commands are obsolete but it does not give any indication or hints of what the new commands are or what's currently available? BrApi.Utilities.EncryptText andBrApi.Utilities.DecryptText Any help is highly appreciated. Thanks, JunHow to copy a scenario from one application to another?
Hello, I recently recovered a scenario from a restored application copy from a point in time. I now would like to extract that scenario from the application copy and put that in our working application. Does anyone have any idea on how this would be done? Thank you, Jeremy MorganSolved1.5KViews0likes6CommentsImporting a CSV file from from Documents/Public/xyz folder to OneStream Cube
Hi, I have a requirement to import a Cell Details CSV file into OS. My questions are as below: 1. Can we import a CSV file from Documents/Public/xyz folder to OneStream Cube? I tried it but it didn't worked. However, I was able to import the CSV from File Share folder. 2. To achieve above, I was trying to copy the CSV file from Documents/Public/xyz folder to File Share folder but I am getting an error "Part of the path cannot be found" (SRC Path: Documents/Public/xyz folder). Error: Here is the code to copy a CSV file from Documents/Public/xyz folder to File Share folder: If args.CustomCalculateArgs.FunctionName.XFEqualsIgnoreCase("Move_File_from_Public_to_FS_Folder") Dim configSettings As AppServerConfigSettings = AppServerConfig.GetSettings(si) Dim xfolderPath As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp( _ si,True, configsettings.fileShareRootFolder,si.AppToken.AppName) Dim DestinationPath As String = "Cell_Details" Dim ParentPath As String = "Documents/Public" Dim fileToMove As String = "Cell_Details.csv" Dim folderPath As String = BRApi.FileSystem.GetFolder( _ si, FileSystemLocation.ApplicationDatabase, ParentPath & "/" & DestinationPath).XFFolder.FullName brapi.ErrorLog.LogMessage(si, "folderPath:" & folderPath) 'File.Copy(Path.Combine(folderPath & "/" & "Cell_Details.csv"), _ ' Path.Combine(xfolderPath & "/" & "Cell_Details.csv"), True) <--- TRIED THIS COMMAND AS WELL BUT GOT THE SAME ERROR Dim fileBytes As Byte() = File.ReadAllBytes(folderPath & "/" & fileToMove) Using dbConnApp As DBConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si) Dim dbFileInfo As New XFFileInfo( _ FileSystemLocation.ApplicationDatabase, fileToMove, xfolderPath, XFFileType.Unknown) dbFileInfo.ContentFileContainsData = True dbFileInfo.ContentFileExtension = dbFileInfo.Extension Dim dbFile As New XFFile(dbFileInfo, String.Empty, fileBytes) BRApi.FileSystem.InsertOrUpdateFile(si, dbFile) End Using End If Below code is working which copies CSV file from File Share folder to Public folder: If args.CustomCalculateArgs.FunctionName.XFEqualsIgnoreCase("Move_File_from_FS_to_Public_Folder") Dim configSettings As AppServerConfigSettings = AppServerConfig.GetSettings(si) Dim xfolderPath As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp( _ si,True, configsettings.fileShareRootFolder,si.AppToken.AppName) Dim DestinationPath As String = "Cell_Details" Dim ParentPath As String = "Documents/Public" Dim fileToMove As String = "Cell_Details.csv" Dim fileBytes As Byte() = File.ReadAllBytes(xfolderPath & "/" & fileToMove) Dim targetDir As String = BRApi.FileSystem.GetFolder(si, _ FileSystemLocation.ApplicationDatabase, ParentPath & "/" & DestinationPath).XFFolder.FullName Using dbConnApp As DBConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si) Dim dbFileInfo As New XFFileInfo( _ FileSystemLocation.ApplicationDatabase, fileToMove, targetDir, XFFileType.Unknown) dbFileInfo.ContentFileContainsData = True dbFileInfo.ContentFileExtension = dbFileInfo.Extension Dim dbFile As New XFFile(dbFileInfo, String.Empty, fileBytes) BRApi.FileSystem.InsertOrUpdateFile(si, dbFile) End Using End If Appreciate any help. Thanks, SidSolved3.4KViews0likes3CommentsNeed physical path to file
I am implementing a BR that pulls a file from FTP. The file is encrypted so I need to decrypt it using a third party library. In order to decrypt it, I need to pass in a physical path to the PGP key provided. I uploaded the key to the Public folder share for now but cannot seem to find a way to get the actual physical file. Does anyone know if uploading a file to the share folder results in an actual file being created on the server or is it just stored as a BLOB in the database?Solved4.8KViews0likes9CommentsWhere are file attachments stored after attaching them to a Reconciliation?
When we attach a file to a Reconciliation, where is the file stored and how is it stored? It it stored in the application database as a BLOB or on the application server in the file system? Is it encrypted?Solved951Views0likes2CommentsFile Explorer Incoming workflow folders missing in copied applications
This post is to provide information about File Explorer Incoming workflow folders. Based on what we've seen in our environments, when an application is copied, the new application does not contain the folder structure located at: \File Share\Applications\<Application Name>\Incoming\<Cube Root Name>_Cube\<Workflow Base Input Name>\<Workflow Import Name> We noticed these folders were missing in our last application copy when we were trying to copy files through SIC and drop them into the workflow import folders since our requirement was to drop them there for users to manually import when they choose (instead of automatically loading the files through batch import from batch harvest). To fix this issue we exported the Workflows and re-imported them back into the copied application. This triggered OneStream to create the cube root folders and workflow folders for the workflows that were imported. Hope this helps someone else who might be running into the same issue.1.3KViews1like5CommentsProblem with Harvest Directory
Hi everyone, I'm having a problem with the Harvest directory. Indeed, I have two batches running at the same time and which retrieve files from an SFTP to put them in the Harvest directory in order to load them into the WF corresponding to each file, for this I use this line coded : Dim batchInfo As WorkflowBatchFileCollection = BRApi.Utilities.ExecuteFileHarvestBatch(si, fixedScenario, systemTime, valTransform, valIntersect, loadCube, processCube, confirm, autoCertify, False) But with this line I do not filter the files present in Harvest. Is there a way to filter by file name inside Harvest which seems to be common and mandatory? Thank you for your help2.7KViews0likes5Comments