I have talked in the past about NACKs.  These are great little messages that allow you to receive the status of your sent messages inside your Orchestration.  For more information on NACKs, please see my earlier post and sample.



The problem I want to point out here occurs if you want to map on the Send Port and have Delivery Notification set to Transmitted inside the Orchestration.  I have found that everything works great as long as your map is successful.  ACKs and NACKs are returned as expected.



If the map on the Sent Port fails is when you have a problem.  In this case, no ACK or NACK is sent back to the Orchestration since the message never reached the pipeline.  The Orchestration will remain running and eventually dehydrate still waiting hopelessly for the ACK or NACK to return.  In addition, the message that was sent gets set to Active and the status is set to Delivered, not consumed.  I have not been able to get the sent message to do anything other then Terminate and even that took some effort.



I have updated my NACK sample to include a map that fails in case you want to test it out for yourself.  The updated download is available here.  Just add the map to your Send Port.  If you want to create your own map, just add a scripting functoid that throws an exception.



Take Away: Be mindful of mapping in the Send Ports if Delivery Notification will be transmitted back to the Orchestration.