Hi,
I wrapped a c# process step in a business process that has been running without issues for several months in a Timeout process step, but am getting an System.AggregateException now whenever the code block is executed. It's odd because if I process the same messages without encapsulating the code step in a Timeout, I do not get an issue, nor if I run it via the process trace debugger.
We wanted to add the Timeout as a precaution in-case the code in the C# code step (which calls a DLL) becomes blocked or takes too long to execute.
the below error is thrown when we include the Timeout step (also including screenshot of business process) - appreciate any insight.
thanks
Marc
Parent Process: Unknown Process Name
Source Process: FIX_TRACKER
Source Process Step: Timeout-FHIRBuilder
Exception Type: System.AggregateException
Exception Message: One or more errors occurred.
Exception Trace: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
at Neuron.Pipelines.ContainerPipelineStep`1.OnExecute(PipelineContext`1 state)
at Neuron.Pipelines.PipelineStep`1.Execute(PipelineContext`1 state)
Inner Exception Type: Neuron.Pipelines.PipelineException
Inner Exception Message: The code step "C# - FHIRBuilde Call" failed due to an error: Object reference not set to an instance of an object.
Inner Exception Trace: at Neuron.Pipelines.CodePipelineStep`1.OnExecute(PipelineContext`1 state)
at Neuron.Pipelines.PipelineStep`1.Execute(PipelineContext`1 state)
at Neuron.Pipelines.PipelineStepGroup`1.OnExecute(PipelineContext`1 context)
at Neuron.Pipelines.ContainerPipelineStep`1.<>n__FabricatedMethod4(PipelineContext`1 A_1)
at Neuron.Pipelines.ContainerPipelineStep`1.<>c__DisplayClass2.<OnExecute>b__0()
at System.Threading.Tasks.Task.Execute()
Inner Exception Type: Neuron.Pipelines.PipelineException
Inner Exception Message: Object reference not set to an instance of an object.
Inner Exception Trace: at Neuron.Pipelines.PipelineStep`1.Execute(PipelineContext`1 state)
at Neuron.Pipelines.CodePipelineStep`1.OnExecute(PipelineContext`1 state)
Inner Exception Type: System.NullReferenceException
Inner Exception Message: Object reference not set to an instance of an object.
Inner Exception Trace: at Neuron.Pipelines.PipelineContext`1.get_Configuration()
at __DynamicCode.Type4c868b922b740ec87ca1fa222e36b7.OnExecute(PipelineContext`1 context) in c:\Windows\Temp\d4kwxy4k.0.cs:line 36
at Neuron.Pipelines.PipelineStep`1.Execute(PipelineContext`1 state)
Tags:
I've dug a bit deeper and it appears that the calls in the C# step to the context.Configuration maybe what is causing the issue. For example, we are grabbing a Credential from the configuration based on an Env var setting. The context.EnvironmentVariables seems ok, but the context.Configuration.Credentials throws the exception above.
var envCredName = context.EnvironmentVariables["neuron_fhir_client_credentials"];
var cred = context.Configuration.Credentials[envCredName];
any reason why getting the context.Configuration within a Timeout step would be an issue?
thanks.
Marc
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by