Forum Discussion
Thank you Koemets and Gidon_Albert for sharing your ideas. These helped a lot. I was able to figure out how to handle if the autoload process encountered an error by using the statement below:
Dim state = brapi.Workflow.Status.GetWorkflowStatus(si, si.WorkflowClusterPk, True)
 If state.HasErrors = "True"
'Do Something
End If
- Mustafa_A4 years agoContributor IIHi Jun, Did you build this rule within Extensibility rule? - JunBinghay4 years agoNew Contributor IIMustafa_A Yes. - Mustafa_A4 years agoContributor IIThanks! I'm trying this out for curiosity. Did you set this BR as a sequence within your load data management? Here is the code. Would appreciate some feedback/comment. 'Define the Workflow unit cluster 
 Dim wfClusterPk As WorkflowUnitClusterPk = BRApi.Workflow.General.GetWorkflowUnitClusterPk(si, "Mgmt Process Load.Import", "Actual", "2021M12")Dim state = BRApi.Workflow.Status.Getworkflowstatus(si, wfClusterPk, False) If state.HasErrors = "True" Then 
 'Connection to the mail server (Defined in Application Server setup)
 Dim emailConnectionName As String = "OneStreamEmail"'Email content (Subject & Body) 
 Dim subject As String = "Test Test Test "Dim messageBody As String = "You've got error" 
 'Add email addresses
 Dim toEmail As New List(Of String)
 Dim userEmailAddress1 As String = "makbar@xyz.com"
 toEmail.Add(userEmailAddress1)'Send the message 
 BRApi.Utilities.SendMail(si, emailConnectionName, toEmail, subject, messageBody, Nothing)
 Else Return Nothing
 End If
 
 
Related Content
- 7 days ago
- 2 years ago