Business Rules for new OS implementation
Hi, we are implementing OS at present, and this is our first-ever project in OneStream; I need guidance on Business Rules. I am not sure what business rules we need to consider after and before we import the data from the Client system to match the client's legacy system data with OneStream numbers. Thanks, Preeti37Views0likes2Commentsperformance issue.
Hello OneStream Community, I am working with a Cube View where I need to display the Income Statement data for the end of every year (December). The data should show up as the beginning balance for the January month in the subsequent year. To achieve this, I used a Row Override1 member filter with the formula T#povprioryearm12. The Cube View includes four dimensions: Entity, Division, Cost Center, and Accounts. However, I am experiencing slow loading times when the view is being accessed. it is not exporting to Excel to validate. I would like to know if there are any best practices or strategies for improving the performance of the Cube View in this scenario. Are there specific optimizations I should consider for the member filter, the dimensions, or the Cube View configuration to reduce loading times? Any advice or recommendations would be greatly appreciated! Thank you in advance!18Views0likes1CommentBusiness Rules Implementation
Hi, I'm trying to learn more about the business Rules and what they are doing. Where can I find the various function implementations. For Example: I have this function Dim connectionString As String = GetConnectionString(si, globals, api) For the GetConnectionString function where is the code for this funciton ? so I can read and understand what its doing ? If this is in the API, I have been looking there today, can you reference which folder / document I can get this. Thanks for your help in advance.57Views1like1CommentError in Business Rule for Data Mgmt Process
Data Mgmt sequence and steps work great when utilizing a 'manual' initiation of this process and business rule. However, the DM process automatically initiates twice daily at specific times using the same code and rules. When this occurs, it fails on occasion (not always), and this error message is received: Summary: Error processing Data Management Step 'ProcessRecons_RCM'. Unable to execute Business Rule 'RCM_DataMgmtProcess'. One or more errors occurred. () Concurrency violation: the UpdateCommand affected 0 of the expected 1 records. This is the business rule in use... asking if anyone can spot an obvious issue I have overlooked or might know the cause of the failed task on occasion. Business Rule: Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As ExtenderArgs) As Object Try Select Case args.FunctionType Case Is = ExtenderFunctionType.ExecuteDataMgmtBusinessRuleStep 'Prepare Parameters Dim wfProfile As String = args.NameValuePairs.XFGetValue("WFProfile", String.Empty) Dim wfTime As String = args.NameValuePairs.XFGetValue("WFTime", String.Empty) 'Load Substitution Variables To Parse WFProfile and WFTime Using dbConnFW As DbConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si) Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si) Dim subVarInfo As SubstVarSourceInfo = SubstitutionVariablesHelper.CreateSubstVarSourceInfo(dbConnFW, dbConnApp, False) wfProfile = SubstitutionVariableParser.ConvertString(si, subVarInfo, Nothing, wfProfile) wfTime = SubstitutionVariableParser.ConvertString(si, subVarInfo, Nothing, wfTime) End Using End Using 'Users Can Supply Either WFProfileName or WFProfileID. If Name Is Supplied Resolve To ID Dim wfProfileID As Guid = Guid.Empty Dim wfProfileInfo As WorkflowProfileInfo = Nothing If Not Guid.TryParse(wfProfile, wfProfileID) Then 'Profile Name Was Supplied wfProfileInfo = BRApi.Workflow.Metadata.GetProfile(si, wfProfile) Else 'ProfileID Was Supplied wfProfileInfo = BRApi.Workflow.Metadata.GetProfile(si, wfProfileID) End If 'Validate WFProfile Supplied Is A Valid Profile If wfProfileInfo Is Nothing Then Throw New XFUserMsgException(si, Nothing, Nothing, $"Error: Invalid workflow profile [{wfProfile}]") Else wfProfileID = wfProfileInfo.UniqueID End If 'Users Can Supply Either WFTimeName or WFTimeID. If Name Is Supplied Resolve To ID Dim wfTimeID As Integer = SharedConstants.Unknown If Not Int32.TryParse(wfTime, wfTimeID) Then 'Time Name Was Supplied wfTimeID = BRApi.Finance.Time.GetIdFromName(si, wfTime) End If 'Validate WFTime Supplied Is A Valid Time If wfTimeID = SharedConstants.Unknown Then Throw New XFUserMsgException(si, Nothing, Nothing, $"Error: Invalid workflow time [{wfTime}]") End If 'Set Task Description Dim rScenarioID As Integer = GeneralHelpers.GetStoredSettingAsInteger(si, RCM_SettingsHelpers.StoredSettingName_ReconScenario) Dim wfClusterPk As New WorkflowUnitClusterPk(wfProfileID, rScenarioID, wfTimeID) Dim wfDesc As String = BRApi.Workflow.General.GetWorkflowUnitClusterPkDescription(si, wfClusterPk) Dim fields As List(Of String) = StringHelper.SplitString(wfDesc, ":", StageConstants.ParserDefaults.DefaultQuoteCharacter) Dim wfName As String = If(fields.Any(), fields(0), "WP#Missing") Dim taskInformation As String = $"{wfName}:S#{ScenarioDimHelper.GetNameFromId(si, rScenarioID)}:T#{BRApi.Finance.Time.GetNameFromId(si, wfTimeID)} - {OFC_SharedConsts.DataMgmtTaskPrefixReconProcess}." DataMgmtHelpers.SetTaskDescription(si, args.TaskActivityID, taskInformation) 'Make sure this DM job can run at this time (unless this was called from a UI action and we checked it already) Dim canDataMgmtJobRunChecked As Boolean = args.NameValuePairs.MPGetValueToBoolean(DataMgmtProcessHelper.CanDataMgmtJobRunCheckedKey, False) If Not canDataMgmtJobRunChecked Then Dim dataMgmtHelper As New DataMgmtProcessHelper(si) Dim params As New Dictionary(Of String, String) From { {"WFProfile", wfProfileID.ToString}, {"WFTime", wfTimeID.ToString}} Dim canDataMgmtJobRun As BoolAndTwoStrings = dataMgmtHelper.CanDataMgmtJobRun(OFC_SharedConsts.DataMgmtSeqReconProcess, params, args.TaskActivityID) If Not canDataMgmtJobRun.Bool1 Then Throw New XFUserMsgException(si, Nothing, Nothing, canDataMgmtJobRun.String1) End If End If 'Execute Process Recons Dim errorMessage As String = String.Empty Dim sScenarioID As Integer = GeneralHelpers.GetStoredSettingAsInteger(si, RCM_SettingsHelpers.StoredSettingName_SourceScenario) Dim processHelper As New ProcessReconsHelper(si, wfProfileID, sScenarioID, rScenarioID, wfTimeID, args.TaskActivityID) processHelper.ExecuteProcessRecons(errorMessage) 'Update Task Information Based On Results If Not String.IsNullOrEmpty(errorMessage) Then taskInformation &= errorMessage DataMgmtHelpers.SetTaskDescription(si, args.TaskActivityID, taskInformation, True) End If End Select Return Nothing Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function End Class End Namespace121Views0likes2CommentsCalculation Definitions Filter -Data Quality Event Handler
Hello, I setup a filter on a workflow profile calculation to run a data management job as long as the no calculate is the selected option. We have a Data Quality Event Handler Business rule to run this; however when I click on process cube, it's running the job twice at the same time. This is the example of what it's doing when I say it's running twice: Here it the code from the event handler: Namespace OneStream.BusinessRule.DataQualityEventHandler.DataQualityEventHandler Public Class MainClass '------------------------------------------------------------------------------------------------------------ 'Reference Code: DataQualityEventHandler ' 'Description: Event handler method that provides an opertunity to supplement a normal data quality ' action with your own custom functionality. ' (Example: email after ProcessCube or publish report to sharepoint after failed Confirmation). ' 'Usage: Executes when a Data Quality action is run and fires this business rule. If you have written ' code in that handles the specified event operation the code will be executed. ' 'Created By: Tom Shea 'Date Created: 1-30-2013 '------------------------------------------------------------------------------------------------------------ Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DataQualityEventHandlerArgs) As Object Try 'Define a switch to control event processing, since many of these are reference examples we do not want them to run all the time Dim processEvents As Boolean = False 'Set the default return values Dim returnValue As Object = args.DefaultReturnValue args.UseReturnValueFromBusinessRule = False args.Cancel = False 'Evaluate the operation type in order to determine which subroutine to process Select Case args.OperationName Case Is = BREventOperationType.DataQuality.ProcessCube.NoCalculate 'Execute a Data Management job after process cube runs Me.XFR_HandleProcessCubeNoCalculate(si, globals, api, args) 'Case Is = BREventOperationType.DataQuality.Certify.FinalizeSetCertifyState 'Send an email after a workflow profile executes its certification 'Me.XFR_HandleFinalizeSetCertifyState(si, globals, api, args) End Select Return returnValue Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function #Region "ProcessCube.NoCalculate Helpers" Private Sub XFR_HandleProcessCubeNoCalculate(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DataQualityEventHandlerArgs) '------------------------------------------------------------------------------------------------------------ 'Reference Code: XFR_HandleProcessCubeNoCalculate ' 'Description: Run a DataMgmt Sequence after the workflow process cube task is run. ' Note: the DataMgmt sequence name is assigned to a Workflow Profile CalcDef filter field ' so this event does not have to be modified, the user can simply edit the CalcDef grid ' for a workflow profile and this business rule will execucte the specified sequence. ' 'Usage: Used to supplement the standard "ProcessCube" functionality associated with a ' workflow profile by allowing a DataManagement sequence to be executed for the workflow profile ' as well. ' 'Created By: Tom Shea 'Date Created: 1-30-2013 '------------------------------------------------------------------------------------------------------------ Try 'Get the DataUnitInfo from the Event arguaments so that we can get the name of the DataManagement sequence to process. Dim calcInfo As DataUnitInfo = DirectCast(args.Inputs(2), DataUnitInfo) If Not calcInfo Is Nothing Then 'Make sure that a Sequence name as assigned to the filter value of the Calc Definition of the executing Workflow Profile If calcInfo.FilterValue <> String.Empty Then 'Now, execute the DataMgmt Sequence that was specified in the FilterValue (In a background thread) BRApi.Utilities.StartDataMgmtSequence(si, calcInfo.FilterValue, Nothing) End If End If Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Sub #End Region End Class End Namespace This is the first time I am setting up an event like this and I am not very good at business rules, so any suggestions or help would be much appreciated! Thank youSolved96Views0likes11CommentsUpdating Scenario Security in a Business Rule
I need to update the security on a scenario using a dashboard button, is this possible through a dashboard extender rule? Essentially a meeting will take place and certain scenarios will need to be locked down so no one can make changes besides the appropriate security group on the call. I will then need to change it back to the original security settings with a separate button once the meeting is overSolved2.2KViews1like5CommentsSolution to Update Task Scheduler Start Times to Account for Daylight Savings
Hi, This time of year we have the common maintenance point regarding needing to update task scheduler start times to account for daylight savings. It is expected for the platform to not automatically update the task start times to account for daylight savings, thus, this becomes a maintenance point for those companies in states/countries that utilize daylight savings. Until this feature perhaps one day becomes available in the platform, we have a custom solution that will make the maintenance point of this easier for OS administrators. You can upload the two files attached in the zip file which will result in uploading an Extender business rule titled "Update_TaskScheduler_StartTimes" and a Data Management job called "Update Task Start Time Daylight Savings". To use the solution, navigate to the Data Mgmt page and look for the group titled "Task Scheduler Maintenance". Here you will find the Data Mgmt sequence and step you uploaded. Navigate to the DM step and utilize the Hour Adjustment parameter to push the task start times backwards (-1) or forward (1) one hour. Once you are happy with the Data Mgmt step setting, go ahead and run the Update Task Start Time Daylight Savings sequence. The sequence will update the task start time for all tasks in the application. We recommend testing this in a Development application first. Please perform this at your own risk in a Production application.4.5KViews12likes18Comments