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
JunBinghay
4 years agoNew Contributor II
Trapping WF Import/Validate/Load Errors
Does anyone have any sample code they can share to see how to trap errors during an automated dataload process? Currently, all I can see is that the dataload process executed and completed but it do...
Mustafa_A
4 years agoContributor II
Hi Jun,
Did you build this rule within Extensibility rule?
JunBinghay
4 years agoNew Contributor II
Mustafa_A Yes.
- Mustafa_A4 years agoContributor II
Thanks!
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 = "[email protected]"
toEmail.Add(userEmailAddress1)'Send the message
BRApi.Utilities.SendMail(si, emailConnectionName, toEmail, subject, messageBody, Nothing)
Else Return Nothing
End If- JunBinghay4 years agoNew Contributor II
I believe this would work. I would go ahead and create a DM job to test this. If you are not getting to the email component during your test, I'd throw out exceptions to see what's going on.
Related Content
- 2 months ago
- 4 years ago