none
Relate ports and messagetypes

    Question

  • Hi all,

    Is it possible, using BizTalk API, relate ports used in an orchestration with message types?

    I tried to read all ports of an orchestration (no problem there), but cann't determine the message type.
    I would like to generate documentation about how a message flows through the system using content based routing. I think I do need to know who publishes a message and who subscribes to the message.

    Kind regards,
    Ronald
    Wednesday, May 20, 2009 9:45 PM

Answers

  • Hi all,

    For me, the most easiest solution was querying the management database.
    I am using the following query (only on development :)):

     

                SELECT     bts_orchestration.nvcFullName AS OchestrationName, bts_orchestration_port.nPolarity AS OperationMessageType, bts_operation_msgtype.nType AS DirectionType, 
                                      bts_messagetype_part.nvcSchemaURTNameSpace AS SchemaNamespace, bts_messagetype_part.nvcSchemaURTTypeName AS SchemaType, 
                                      bts_application.nvcName AS ApplicationName
                FROM         bts_assembly INNER JOIN
                                      bts_application ON bts_assembly.nApplicationID = bts_application.nID INNER JOIN
                                      bts_messagetype_part INNER JOIN
                                      bts_orchestration_port INNER JOIN
                                      bts_orchestration ON bts_orchestration_port.nOrchestrationID = bts_orchestration.nID INNER JOIN
                                      bts_porttype ON bts_orchestration_port.nPortTypeID = bts_porttype.nID INNER JOIN
                                      bts_operation_msgtype INNER JOIN
                                      bts_porttype_operation ON bts_operation_msgtype.nOperationID = bts_porttype_operation.nID ON bts_porttype.nID = bts_porttype_operation.nPortTypeID ON 
                                      bts_messagetype_part.nMessageTypeID = bts_operation_msgtype.nMessageTypeID ON bts_assembly.nID = bts_orchestration.nAssemblyID
    

    this does provide me the proper information for displaying relations between applications (based on messages), however it does not taken in account any filtering properties (which would be nice).


    regards,
    Ronald 

    • Marked as answer by RonaldK Monday, May 25, 2009 9:38 AM
    Monday, May 25, 2009 9:37 AM

All replies

  • For subscriptions you probably won't get there with the ExplorerOM dll if that's what you're using. Have a look at the Subscription class in microsoft.biztalk.operations.dll and check out the sample code here:

    http://msdn.microsoft.com/en-us/library/microsoft.biztalk.operations.subscription.aspx


    Thiago Almeida - http://connectedthoughts.wordpress.com
    Thursday, May 21, 2009 2:50 AM
    Answerer
  • Hi

    The message type is associated with the port type in the orchestrations and not the ports.

    eliasen, representing himself and not the company he works for.
    MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
    Thursday, May 21, 2009 9:26 AM
  • Hi,

    Thanks for answering. 
    I did go down that way and seems your right: orchestrations -> ports -> porttype -> operations, but no MessageTypes associated :(.

    Thursday, May 21, 2009 7:48 PM
  • Hi,

    Thanks for the hint. I'm not sure yet if this will work. If it does, I let you know.
    Thursday, May 21, 2009 7:50 PM
  • I have no experiene using the explorerOM, but if I view the port types in orchestration view then the message type is under port type => operations => request - so one level deeper than you are writing...
    eliasen, representing himself and not the company he works for.
    MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
    Thursday, May 21, 2009 8:23 PM
  • Additionally, using the ExplorerOM the ports collection does not seem to contain the direct bound ports...

    Thursday, May 21, 2009 8:28 PM
  • Hi all,

    For me, the most easiest solution was querying the management database.
    I am using the following query (only on development :)):

     

                SELECT     bts_orchestration.nvcFullName AS OchestrationName, bts_orchestration_port.nPolarity AS OperationMessageType, bts_operation_msgtype.nType AS DirectionType, 
                                      bts_messagetype_part.nvcSchemaURTNameSpace AS SchemaNamespace, bts_messagetype_part.nvcSchemaURTTypeName AS SchemaType, 
                                      bts_application.nvcName AS ApplicationName
                FROM         bts_assembly INNER JOIN
                                      bts_application ON bts_assembly.nApplicationID = bts_application.nID INNER JOIN
                                      bts_messagetype_part INNER JOIN
                                      bts_orchestration_port INNER JOIN
                                      bts_orchestration ON bts_orchestration_port.nOrchestrationID = bts_orchestration.nID INNER JOIN
                                      bts_porttype ON bts_orchestration_port.nPortTypeID = bts_porttype.nID INNER JOIN
                                      bts_operation_msgtype INNER JOIN
                                      bts_porttype_operation ON bts_operation_msgtype.nOperationID = bts_porttype_operation.nID ON bts_porttype.nID = bts_porttype_operation.nPortTypeID ON 
                                      bts_messagetype_part.nMessageTypeID = bts_operation_msgtype.nMessageTypeID ON bts_assembly.nID = bts_orchestration.nAssemblyID
    

    this does provide me the proper information for displaying relations between applications (based on messages), however it does not taken in account any filtering properties (which would be nice).


    regards,
    Ronald 

    • Marked as answer by RonaldK Monday, May 25, 2009 9:38 AM
    Monday, May 25, 2009 9:37 AM