Hi,
I developed a protocol that receives a message from an automation script and returns a list of data. I'm using the InterApp resource to perform this task and I see that the automation sends the request and the protocol returns the response perfectly, but, for some reason, the script goes into timeout. I am displaying the request and response parameters and I see that communication between them is correct.
Hi Robin, I\'ve found the error.
The executor\'s request and response classes (AlarmFetcherRequestMessage and AlarmFetcherResponseMessage) were in the same namespace, as they should be (I created a dll library). However, the AlarmFetcherResponseMessage class has a property that contains a list of objects of type \"Alarm\", which was not declared in the same namespace.
I put them all in the same namespace and it worked!
Thank you!
Hi Maximiliano,
The automation script will send that Inter App message containing a GUID to the connector. The Automation script will only listen for responses if they have the same identifier as the request that was send out.
Would it be possible to double check in the connector that the return message Guid is set to the same Guid property from the request?
E.G. code example in the executor class
public override Message CreateReturnMessage()
{
return new AlarmFetchResponseMessage { Guid = Message.Guid, Success = true };
}
E.G. example Inter App Receiver/Response
More details can also be found under Docs.
Let us know if this helps.
Kind regards,
Sorry, I sent the incomplete question.
Continuing...
This is my automation script
What am I doing wrong?
Hi Robin,
As I said in the comment, the UUID is the same.
This is the CreateReturnMessage code in the executor:
var dateTimeInterval = IncidentLibrary.Common.IncidentHelper.GetRoundedIntervalDates(1, 10);
var alarms = PreCompiled.Methods.FetchAlarms(Message.CorrelatorElementList, dateTimeInterval);
var returnMessage = new AlarmFetcherResponseMessage()
{
Guid = Message.Guid,
Source = Message.Source,
ReturnAddress = Message.ReturnAddress,
Alarms = alarms,
};
return returnMessage;
Hi Maximiliano,
The source property seems to be empty in the return message (agentId and elementId set to default value 0).
Would it be possible to give it a try with the Source filled in for the returnMessage?
E.G.
var returnMessage = new AlarmFetcherResponseMessage()
{
Guid = Message.Guid,
Source = new Source(“Connector Name”, protocol.DataMinerID, protocol.ElementId),
Alarms = alarms,
};
And if possible verify where the return messsage is send, the code is using the original returnAddress.
E.G.
returnMessage.Send(
protocol.SLNet.RawConnection,
message.ReturnAddress.AgentId,
message.ReturnAddress.ElementId,
message.ReturnAddress.ParameterId,
KnownTypes);
Let us know if this works for you.
Kind regards.
Hi Robin.
yes, they have the same UUID. I’m adding the screenshots in a new answer