The 'PostDispatchMessage' and 'PostSendResult' cannot be used together in the script, only one of the methods should be used to handle the message. The 'PostDispatchMessage' is used when you want to assign the message to another gateway (or multiple gateways) and the 'PostSendResult'is used to set the status of the message after the script has sent the message or failed to send the message.
If you need to set the status of the message and also assign it to another gateway, you could use the HTTP API of a Web Connector, call the 'send-message' HTTP API call from the script and then call 'PostSendResult' to set the status of the message. The end result is two messages, one with the status that you have set in the script and one with the send status of the gateway that handled the message from the HTTP API.
When we make a C# script, and when we send messages using PostDispatchMessage and PostSendResult about half of messages remain stuck in the queue. If we use PostDispatchMessage everything is fine, but we need PostSendResult as well, as we need to set some custom Status Codes.
Most Users Ever Online: 494
Currently Browsing this Page:
Guest Posters: 590
Newest Members:, Henk Helmantel
Administrators: Henk Helmantel: 1241