locked
Content based routing issue. RRS feed

  • Question

  •     

    Target Schema(XML):            

    Mapping :

    Hello All,

    my Source Schema  is flat file which has three fields FirstName, LastName and Phone(Can see in map).    

    As shown above I am using source schema, Target schema and mapping in my scenario.

    In target schema I have promoted fullName field to used as filter condition.

    I am trying to implement simple Content based routing Here.

    At receive port I used above map to translate and transform Flat file schema(Source) to Xml schema with different structure(target). and again this xml I am converting to flat file at send port using pipeline(FlatFileAssembler).

    Filter coditions : 

      BTS.ReceivePortName == RCV_FFILE And
      Demo.CBRouting.FullName == Hello John And

    I kept my receive pipeline as passthrough as I am using MAP at receive port.

    I am simply routing message based on FullName if it will match,

    but its not working

    giving subscriber not found error.

    Please help.

    Thanks.



    • Edited by _NiLeSh Monday, May 11, 2015 8:54 AM
    Monday, May 11, 2015 8:43 AM

Answers

  • We can have maps associated with a Port using Passthru pipeline, but map won’t be executed. The reason being, maps can’t be applied to Untyped Messages and as PassThru does no processing on message, no message type available as MessageType promotion is part of pipeline processing.

    Use XMLReceive pipeline.

    Rachit


    Please mark as answer or vote as helpful if my reply does


    Monday, May 11, 2015 9:10 AM
    Moderator

All replies

  • Hi,

    Try using XMLReceive pipeline. The basics of this is that a map works on a particular message type and by using pass thru pipeline you are not promoting the message type and thus subscriber not found error is poping up.

    Use an XMLReceive pipeline which will promote the message type and then it will execute the map and promote your FullName then it will dump the message into the message box and then various subscribers can subscribe this message on the basis of FullName.

    Regards

    Rahul Madaan

    Monday, May 11, 2015 9:07 AM
  • What context properties do you see. Check in the context of the message and it will help.

    Regards <br/> When you see answers and helpful posts,<br/> please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Monday, May 11, 2015 9:07 AM
    Answerer
  • We can have maps associated with a Port using Passthru pipeline, but map won’t be executed. The reason being, maps can’t be applied to Untyped Messages and as PassThru does no processing on message, no message type available as MessageType promotion is part of pipeline processing.

    Use XMLReceive pipeline.

    Rachit


    Please mark as answer or vote as helpful if my reply does


    Monday, May 11, 2015 9:10 AM
    Moderator
  • Thanks Rahul for your reply.

    but my input schema is flat file schema. it wont execute

    receive pipeline in that case. ??


    • Edited by _NiLeSh Monday, May 11, 2015 10:44 AM
    Monday, May 11, 2015 9:14 AM
  • Hi,

    If you are receiving a flat file, you should use the Flat File Disassembler pipeline component to process the message and translate it into a typed XML message. This XML will be used as input to the map and the context properties will be promoted correctly.

    Regards.


    • Edited by ohawari Monday, May 11, 2015 9:21 AM
    Monday, May 11, 2015 9:21 AM
  • Thanks Rachit.

    but my input schema is flat file schema.

    • Edited by _NiLeSh Monday, May 11, 2015 9:22 AM
    Monday, May 11, 2015 9:21 AM
  • If you need to perform any processing on the message in biztalk you have to transform your flat file it into a typed XML message at recieve.

    As already informed maps can’t be applied to Untyped Messages and as PassThru does no processing on message, no message type available as MessageType promotion is part of pipeline processing.

    Refer on how to achieve this: BizTalk Server: Transform Text Files (Flat Files) into XML

    Rachit


    Please mark as answer or vote as helpful if my reply does


    Monday, May 11, 2015 9:35 AM
    Moderator
  • As you said the translated xml will be used as input to map so,

    I have created a xml schema of same structure as flat file schme in my case

    And mapped it to Xml target schema..

    giving  error subscriber not found.


    will it become dynamically a input to Map ?
    • Edited by _NiLeSh Monday, May 11, 2015 9:40 AM
    Monday, May 11, 2015 9:39 AM
  • Just use Flat file disassembler pipeline. It holds one additional functionality apart from XMLReceive pipeline that it also converts Flat file format to XML format rest all other functionality of XMLReceive pipeline i.e. Promotion,Validation and Disassambling.

    Monday, May 11, 2015 9:43 AM
  • As you said the translated xml will be used as input to map so,

    I have created a xml schema of same structure as flat file schme in my case

    And mapped it to Xml target schema..

    giving  error subscriber not found.


    will it become dynamically a input to Map ?

    This is confusing. You should refer the link and building your solution around it.

    BizTalk Server: Transform Text Files (Flat Files) into XML

    Rachit


    Please mark as answer or vote as helpful if my reply does

    Monday, May 11, 2015 9:52 AM
    Moderator
  • Hi Rachit.

    I used receive pipeline for disassembling flat file but I need to transforms

    the message to some other structure also

    Source Schema(FlatFile) :  three fields :-FirstName, LastName and Phone

    At send I want this as TargetSchema (XML):-FullName and Contact 

    I am not understanding how do I achieve this..

    please help..

    • Edited by _NiLeSh Monday, May 11, 2015 10:53 AM
    Monday, May 11, 2015 10:51 AM
  • Can you check your flat file, is there any space after the last row in file . due to this also you can get the subscriber will not found error .

    Do the below steps also.

    1.Validate Schema with flat file

    2.Validate Map with Flat file .

    Monday, May 11, 2015 11:11 AM
  • Hi,

    They are independent tasks.

    First you have to use a Pipeline for disassembling the flat file. It will generate a typed XML that matches the Flat file Schema you have defined.

    If this process is correct, the map is then applied taking this generated XML message as the input message.

    The Map must have defined as Source Schema the Flat File Schema and as Target Schema the one you want to generate as a result and that will be routed to the send port.

    Regards.


    • Edited by ohawari Monday, May 11, 2015 11:32 AM
    Monday, May 11, 2015 11:32 AM