locked
Mapping doesnt work when working with a custom pipeline component RRS feed

  • Question

  • Hi,

    I have a scenario that we receive order files which we map to a intermediate format and from the intermediate format to a end format.

    If i use the first map in the receive port and the second map in the send port everything would normally work.

    But in this scenario i have a custom pipeline component to rename the namespace and the root node. When i test this scenario the namespace is changed but not a single mapping is applied. 

    I fixed this issue by using the first mapping in the receive port and the second mapping is applied in a orchestration. But i dont think this is a good solution. So my question is why does this work in combination with a orchestration and not with a normal receive/send port mapping?

    Friday, October 17, 2014 9:22 AM

Answers

  • But in this scenario i have a custom pipeline component to rename the namespace and the root node. When i test this scenario the namespace is changed but not a single mapping is applied.
    Unless you changed the Map to match exactly the renamed Root Node, that is the expected behavior because well, then they don't match.
    • Proposed as answer by AnoopVishnoi Tuesday, October 21, 2014 6:42 PM
    • Unproposed as answer by AnoopVishnoi Tuesday, October 21, 2014 6:42 PM
    • Proposed as answer by AnoopVishnoi Tuesday, October 21, 2014 6:42 PM
    • Marked as answer by Angie Xu Friday, October 24, 2014 1:23 AM
    Tuesday, October 21, 2014 11:20 AM
    Moderator

All replies

  • Hi,

    Does orchestration n send port have same subscrtion type ? Please check. There is a mis match of schema whcih map expecting.

    thanks

    Ismail

    Friday, October 17, 2014 10:09 AM
  • Maps in the ports are applies AFTER the pipeline.

    So in the case of a receive port, the message is received, run through the pipeline and then the MAP is applied before it is pushed into the MessageBox. For a send port, the message is picked up from the MessageBox, run through the pipeline and then the MAP is applied before it is sent to the Adapter for the transmission.

    If you have built a MAP with the source as <source namespace>:<source schema root> and in the pipeline you've changed the namespace AND/OR the schema root then the XSL engine would not be able to find the node against which to run the transform and MAP would not be executed. This is the same reason you can have multiple MAP published on the same port.

    Regards.

    Friday, October 17, 2014 10:33 AM
  • Hi Ronald,

    The execution/processing of a message happens like below in BizTalk

    On Receive Side
    End system –> Receive Adapter –> Receive Pipeline –> InboundMap –> Message Box
    On Send Side
    Message Box –> Outbound Map –> Send Pipeline –> Send Adapter –> End System

    So in your case I believe your message is getting changed by your custom receive pipeline, because of that MAP is not able to pick that up.

    I hope this helps.


    Greetings,HTH
    Naushad Alam

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    alamnaushad.wordpress.com

    Friday, October 17, 2014 11:27 AM
    Moderator
  • Check if the renaming of Root Node and Namespace i.e u are changing the MessageType, has any impact on the subscription which u have on send port and the map selected is also expecting the correct message in source.

    Regards &lt;br/&gt; When you see answers and helpful posts,&lt;br/&gt; please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Monday, October 20, 2014 8:00 AM
    Answerer
  • Hi Ronald,

    > But in this scenario i have a custom pipeline component to rename the namespace and the root node

    Well you can't really do that as BizTalk Messages are immutable. For syndication see:

    http://blogs.biztalk360.com/why-messages-are-immutable-inside-biztalk/

    What you have to do is get a copy of the message in new namespace. I vaguely remember this is what the ESB name changing component does. With your copy you need to set the Properties again, e.g  by putting the message thru the BizTalk disassembly (XmlDasm) component.

    When you bring that message into an orchestration these things are happening (somehow) for you and your mapping works.

    This is how it has been in BizTalk for years, it is possible that things have changed but I've not heard anywhere that it has.

    The easiest approach is to combine the namespace change in the map.


    mark

    Monday, October 20, 2014 8:12 PM
  • Hi Shankycheil,

    For a send port, the message is picked up from the MessageBox, run through the pipeline and then the MAP is applied before it is sent to the Adapter for the transmission.

    I believe you wanted to say the map first and the pipeline next in the send port.


    Praveen Behara
    MCST : BizTalk Server 2006 R2, 2010

    Monday, October 20, 2014 8:50 PM
  • Hi Mark,

    IMHO, the immutable clause applies once the message is submitted to the message box. So, on the receive side, it is only after the pipeline cum specified map execution is done.. the message(s) is/are submitted to the MessageBox. Naushad's post (above) also specifies something like that..

    As far as I can remember, the ESB namespace component would iterate through each of the elements and "suppresses" writing the namespace or "adds/replaces" namespace


    Praveen Behara
    MCST : BizTalk Server 2006 R2, 2010

    Monday, October 20, 2014 9:00 PM
  • Hi Ron,

    Can you try the pure messaging scenario with a filter on the send port with the name of the receive port instead of the intermediate message type and try it if it yields the same result i.e. neither of the receive nor send port maps are getting applied. If yes, could you unenlist both orchestration and send port and see what kind of message is being submitted to the message box.


    Praveen Behara
    MCST : BizTalk Server 2006 R2, 2010

    Monday, October 20, 2014 9:10 PM
  • Yes. Naushad has rendered the correct sequence in the following post. The point however is did it help resolve the issue?

    Regards.


    • Edited by Shankycheil Tuesday, October 21, 2014 4:47 AM edit
    Tuesday, October 21, 2014 4:47 AM
  • Praveen,

    >IMHO, the immutable clause applies once the message is submitted to the message box.

    That is my understanding too.

    >So, on the receive side, it is only after the pipeline cum specified map execution is done.. the message(s) is/are submitted to the MessageBox

    I'm not so sure about that. I believe it is the adapter that puts it in the MessageBox. So for example you could subscribe to the mapped version (what you really want) and a "raw" version (for tracing purposes).

    Any clarification by the DevTeam much appreciated.


    mark

    Tuesday, October 21, 2014 9:18 AM
  • But in this scenario i have a custom pipeline component to rename the namespace and the root node. When i test this scenario the namespace is changed but not a single mapping is applied.
    Unless you changed the Map to match exactly the renamed Root Node, that is the expected behavior because well, then they don't match.
    • Proposed as answer by AnoopVishnoi Tuesday, October 21, 2014 6:42 PM
    • Unproposed as answer by AnoopVishnoi Tuesday, October 21, 2014 6:42 PM
    • Proposed as answer by AnoopVishnoi Tuesday, October 21, 2014 6:42 PM
    • Marked as answer by Angie Xu Friday, October 24, 2014 1:23 AM
    Tuesday, October 21, 2014 11:20 AM
    Moderator