I have a service connector which I am using multiple times in a workflow to call our Third Party Vendor.The call always works when I test the workflow individually, however, fails intermittently when I run an E2E scenario.
This is the error that gets logged from the service connector errors-
FailureDetail - Message Receive to Party failed. Exception Type: System.Reflection.TargetInvocationException
Exception Message: Exception has been thrown by the target of an invocation.
Exception Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
at System.Delegate.DynamicInvokeImpl(Object args)
at Neuron.Esb.Channels.ESBClientContext.invoke(InvokeParams p)
at Neuron.Esb.Channels.ESBClientContext.invoke(String name, Delegate d, EventArgs args)
at Neuron.Esb.Channels.ESBClientContext.RaiseMessageReceivedEvent(ESBMessage message, CommittableTransaction tx)
at Neuron.Esb.Channels.ESBChannelManager.ReceiveMessagePart(ESBMessage message, CommittableTransaction tx)
Inner Exception Type: System.ArgumentNullException
Inner Exception Message: A REST Method must be provided.
Parameter name: Method
Inner Exception Trace: at Neuron.Esb.EsbService.ESBServiceConnector.process(MessageEventArgs e, Action`1 reply)
at Neuron.Esb.EsbService.ESBServiceConnector.Receive(Object sender, MessageEventArgs e)
FailureType - TargetInvocationException
Any idea why this would be?
what build of Neuron are you using?
also, are you calling a SOAP or REST endpoint?
if the call is REST, we always check if the method is set i.e. ESBMessage.Http.Method property. if its null, we throw that error
The call is REST, and I am setting the Method to "GET" in a CSharp method before making the service endpoint call. It works every alternate time. I am now using a topic and subscriber to call the service instead of the service connector and it seems to work every time.
so you were seeing it intermittently fail when using the service endpoint Workflow Activity?
Yes, it happened every alternate time.
but can you confirm that you experienced this when using the Service Endpoint Workflow Activity and not through messaging i.e. sending out through a Topic?
Yes, when I used the service endpoint workflow activity I got this error. The call works now when using topics.