ssmith-nova
9 days agoNew Contributor III
BR works when run manually, but not through Task Schedule
I have the code below in an Extender BR. It runs fine if I run it manually in the BR or manually through a DM job. But when it runs in the Task Scheduler it fails, and I get the "Object reference not set to an instance of an object." error. Any thoughts?
Dim wfUnitClusterPk As WorkflowUnitClusterPk = BRApi.Workflow.General.GetWorkflowUnitClusterPk(si, wfProfileName, wfScenarioName, wfTimeName)
Dim ImportInfo As New LoadTransformProcessInfo
Try
ImportInfo = BRApi.Import.Process.ExecuteParseAndTransform(si, wfUnitClusterPk, "", Nothing, TransformLoadMethodTypes.Replace, SourceDataOriginTypes.FromDirectConnection, False)
Catch ex As Exception
log.AppendLine("Import Done - Status: " & ImportInfo.Status & " - RowCount: " & FormatNumber(ImportInfo.RowCount, 0,,,-1))
log.AppendLine(ImportInfo.ErrorMessage)
log.AppendLine("------------------------------")
log.AppendLine(ex.GetBaseException.Message.ToString.Trim)
End Try
I'm not going to bother. I moved it to a different dev application and It is working as expected. Unless someone can think of a reason task scheduler wouldn't run BR correctly in an application I think my problem is resolved. I appreciate everyone's help.
Scott