Search code examples
biztalkbiztalk-2013

Custom Acknowledgement for Incoming Messages


I'm not sure if I'm doing this right.

Our orchestration looks like this:

ReceiveOrder
TryScope (Long Running)
   AcknowledgementScope (Atomic)
     ConstructOrderAckMessage
        TransformOrderToAck (using a map)
     SendOrderAckToMessageQueue
   AtomicWebServiceScope
      ImportOrderToDBExpression
   Construct and send message to another process
CatchException
      ConstructErrorExpression
      HandleExceptionStartOrchestration

When we tested this with about 6000 orders, we noticed that all of them resulted in an acknowledgment message (SendOrderAckToMessageQueue). The acknowledgment is a simple XML based on a schema provided by the crew that sends the order to this orchestration.

However, not all of them got imported into the database (ImportOrderToDBExpression) (about 45). In fact, there are no errors or failures or suspended instances of any kind. There's nothing unusual about the orders that did not get imported. If it failed, it did so silently.

Please note, that the AcknowledgementScope portion is something added recently; prior to that all the orders got imported successfully.

Is this because I have the Scope set incorrectly in this orchestration? Where else could the problem be? Is there a better way to send acknowledgment in a fool proof way? Thanks for any advice.


Solution

  • You don't mention any Catch Blocks. Do you have Catch Blocks on all your Scopes?

    If there is an Exception without a Catch Block or a Catch Block that does not log the Exception, it will appear to silently fail.