none
ACK message not getting generated even when send port has a subscription BTS.AckType = ACK. RRS feed

  • Question

  • Hi,

    I have 2 send ports onle subscribed to ACK message(BTS.ACK = ACK) and other to NACK message(BTS.ACK = NACK).

    I am actually having a pipeline component "context Swapper" which actually generates an xml document with all the context values of a message and puts that xml document into the message body as a body part and the previous body part is also readded as a non-body part.

    So I use this component in the send pipeline of ACK message send port but still the ACK is not generated(though, now it has a non zero body unlike the scenario mentioned in this post http://social.msdn.microsoft.com/Forums/en-GB/biztalkgeneral/thread/43e9de26-f13f-4c6e-ad76-61141c30b4b6 Setting up an ACK subscription in a pure messaging scenario (NACK works but not ACK)?)

    I dont know whether ACK message is getting generated or not and how to capture it.

     

    Any ideas ? please help

     

    Thanks in advance

    Surya
    Friday, March 4, 2011 2:34 PM

Answers

  • Hi Surya,

     

    You need to set the system context property AckRequired to true.

    the pipeline component code can be like below:

    public IBaseMessage Execute(IPipelineContext Context, IBaseMessage inMsg)

    {

       InMsg.Context.Promote("AckRequired", 

            "http://schemas.microsoft.com/BizTalk/2009/system-properties"

            true);

    }

    WBR,

    prasad


    regards, pnvrkprasad

    Tuesday, March 22, 2011 1:20 AM

All replies

  • Hey Surya,

    I am not very clear about your scenario. As I understand, you are trying to capture all the ACK and NACK messages.

    Use 2 sendports with filter set to "BTS.AckType == ack"  and "BTS.AckType == Nack" respectively and direct them to folders to check them.

    Or "BTS.AckType Exists" can be ysed to capture both ACKs and NACKs.

    If you are trying to capture the ACK of a send port(I assume you want to catch the ack/nack of the port with sendpipeline), do not set the filter to receive the ACK on the same port.use a different one.

    Please let me know if your scenario is different.

    Thanks.
    Please mark this as answered if it helps.

    Sriram N http://srirambiztalks.wordpress.com/
    Saturday, March 5, 2011 11:04 PM
  • Hi Surya,

    If I am not wrong you are using this for error handling; more specifically to handle the transmission failure messages. sriram's suggestion on using a separate port to capture these success/failed messages (not in your main business participating ports)

    Please see the below thread for the same problem.

    http://social.msdn.microsoft.com/Forums/en/biztalkgeneral/thread/43e9de26-f13f-4c6e-ad76-61141c30b4b6

    'Generating ACKs from BizTalk - Two Approaches' article by eric may help.

     http://blog.hl7-info.com/archive/2006/12/22/Generating_ACKs_from_BizTalk__Two_Approaches.aspx


    regards, pnvrkprasad
    Sunday, March 6, 2011 9:07 AM
  • Hi Sriram,

    well my scenario is, as the post in (http://social.msdn.microsoft.com/Forums/en/biztalkgeneral/thread/43e9de26-f13f-4c6e-ad76-61141c30b4b6 ) says ACK messages have zero length message body and hence the the send adapter drops it off, I had created a pipeline component that adds dummy data into the body so that I can see something being written out by the send adapter.

    Still even after using this pipeline component, it does get the ACK message.

    I had also added code to write debug information in the event log in the pipeline component code so that I know if this pipeline cmponent is called. but no debug information is written in event log which means the pipeline is not called at all, so which probably means there is no ACK message generated to trigger the subscription.

    here is the list of send and receive port (this is a message only scenario)

    ReceiveData = receive port (pass through pipeline)

    SendData = Send port (pass through pipeline)

    SendACK = send port for ACK (filter condition = BTS.AckType == ACK  And BTS.AckReceivePortName == ReceiveData), (pipeline = SendPipeline1 containing a pipeline component that writes "hello world" string in the message body part, replacing any data that was previously present in the message body part)

    SendNACK = send port for NACK (filter condition = BTS.AckType == NACK  And BTS.AckReceivePortName == ReceiveData), (pipeline = SendPipeline1 containing a pipeline component that writes "hello world" string in the message body part, replacing any data that was previously present in the message body part)

     

    I receive only message from SendNACK if there are any errors, but if the data has been successfully sent through the SendData then I dont receive ACK message.

     

    or simply put, I want a sample or somebody let me know how to receive a ACK message in message only scenario.

     

    Thanks

    Surya

    Monday, March 7, 2011 10:08 AM
  • hi prasad,

    Yes, I know that  the ACK message has zero length body that is why i am having a pipeline component to add some dummy data into it. but still i am unable to receive the ACK message.

     

    Thanks 

    Surya

    Monday, March 7, 2011 10:10 AM
  • Hi Surya,

     

    You need to set the system context property AckRequired to true.

    the pipeline component code can be like below:

    public IBaseMessage Execute(IPipelineContext Context, IBaseMessage inMsg)

    {

       InMsg.Context.Promote("AckRequired", 

            "http://schemas.microsoft.com/BizTalk/2009/system-properties"

            true);

    }

    WBR,

    prasad


    regards, pnvrkprasad

    Tuesday, March 22, 2011 1:20 AM