none
detect adapter type RRS feed

  • Question

  • I have a question about ports, receiving or sending.

    While building an orchestration, and setting up send and receive ports, most of the times those ports are late binded but usually the developer assumes the type of the adapter and uses adapter specific properties.

    Is there a way to detect the type of adapter of a receiving or sending port so that using those adapter specific properties does make sense?

    for example if the port is msmq put some data in the label of the message

    thanks in advance

    Wednesday, December 15, 2010 2:43 PM

Answers

  • Hi,

    In that case either BRE or custom pipeline is a little too much overhead. I would opt in your situation for a decide shape based on property value and take from there. This way you do need custom code anything, just configuration.

    HTH

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Thursday, December 16, 2010 11:52 AM
    Moderator
  • Maybe you can use BTS.InboundTransportType. This should state FILE, FTP, whatever.  But it only shows "WCF-Custom" so if you need to see the binding itself you need to look deeper using the WCF.BindingType property. With this two properties you should be able to determine the adapter / binding during runtime.


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://pi.hauth.me

    Thursday, December 16, 2010 1:04 PM

All replies

  • Hi,

    An option is to use Business Rules to decide what the adapter type of the port is. With the business rules you can also set the value in the message,.

    greetings,

     

    Tomasso Groenendijk

     

    Wednesday, December 15, 2010 6:12 PM
  • Hi,

    BRE can be option, but you could also use custom pipeline for this. This would as with BRE leave your orchestration as is. In the end it depends on your requirement(s)/situation and what is best fit for purpose (or where you feel most confident in). Regardless of which option you will choose, you well need customization through .NET custom coding, and/or BRE tools to have this in place.

    HTH

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Wednesday, December 15, 2010 6:45 PM
    Moderator
  • thank you for your replies

    ok I think that business rules are out of the question because its something that is not controlled by the developer after deploy. Me as a developer build orchestration pipelines etc. The administrator deploys according to my instructions but he could make a mistake and the orchestration missbehave.

    Pipelines on the otherhand is something I can control but I was asking if I could make the custom code inside the orchestration to minimize deployment errors

    In my example at the last steps of an orchestration thera are 2 sends. one that sends the result of the process to an MSMQ for some other system to take it from there and another one which sends the result to the manager by email. the 2 outgoing messages have the same businnes meaning and schema. because of another requirement I had to construct 2 different instances of the same message type. According to requirements the msmq message should have the have a reference ID (data string) as a label. the same referenceID in the second message should be placed as a subject to email. So before send of the first message I set the label

    RespMessage1(MSMQ.Label)="<data>";

    and send it to abstruct port "queue port"(meaning the msmq port for late binding)

    and

    RespMessage2(SMTP.Subject)="<data>";

    and send it to the abstruct port "report queue"(meaning the smtp port)

    the deployer mixed those to ports.

    I was wondering if the custom code be inside the orchestration by some kind of code

    if (report_queue(<some property>) is <type of SMTP>)

    RespMessage2(SMTP.Subject)="<data>";

    else

    RespMessage2(MSMQ.Label)="<data>";

    but this I cant figure out.

    thanks

    Thursday, December 16, 2010 9:47 AM
  • Hi,

    In that case either BRE or custom pipeline is a little too much overhead. I would opt in your situation for a decide shape based on property value and take from there. This way you do need custom code anything, just configuration.

    HTH

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Thursday, December 16, 2010 11:52 AM
    Moderator
  • Maybe you can use BTS.InboundTransportType. This should state FILE, FTP, whatever.  But it only shows "WCF-Custom" so if you need to see the binding itself you need to look deeper using the WCF.BindingType property. With this two properties you should be able to determine the adapter / binding during runtime.


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://pi.hauth.me

    Thursday, December 16, 2010 1:04 PM